a little help here please... :)

From: Date: Fri, 01 Dec 2000 01:52:39 +0000
Subject: a little help here please... :)
Groups: php.general 
Request: Send a blank email to php-general+get-28144@lists.php.net to get a copy of this message
First: I'm building a filing system (for whatever... in this case is clients)... so I'll manage their data (name, email, blablah)... and I wanna encapsulate all in one file (include, modify, list and delete)... what is the best way of "knowing" what ths script was called for... is it this way? <?php $options=array( 1 => stristr($QUERY_STRING,"delete"), 2 => stristr($QUERY_STRING,"list"), 3 => isset($HTTP_POST_VARS[email]) && !isset($HTTP_POST_VARS[modify]), 4 => stristr($QUERY_STRING,"edit"), 5 => isset($HTTP_POST_VARS[modify]), 6 => !isset($QUERY_STRING) ); $op; while(list($ind,$bool) = each($options)) { $op=$ind; if($bool) break; } switch($op) { case 1 : delete($delete); break; case 2 : lista(); break; case 3 : inclui($HTTP_POST_VARS); break; case 4 : mostra_form(basename($PHP_SELF),$edit); break; case 5 : altera($HTTP_POST_VARS,$modify); break; case 6 : mostra_form(basename($PHP_SELF),0); break; default: echo "Nothing to do"; break; } this is working fine... but I'm not sure this is 100% correct... it's seems like a really crapy code. Second: I can't open files with absoulte paths right? like in C... include("/home/whatever/www/something.htm") works but include("/something.htm"); doesn't... altough in HTML I can link that way... why is that? can someone exaplain it to me? Third: Is there a minimum word-size for GET and POST vars? cuz I tried to build a little script with the vars email and p1... p1 didn't return anything... not even isset() returned true... but parm1 worked fine... I had a fourth one but I forgot it now... thanks! ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer

« previous php.general (#28144) next »