On Tue, 2003-06-17 at 09:09, nabil wrote:
> A side question along with  this ,,, how can I include $_POST['foo']  in the
> :
> $sql ="select * from db where apple = '$_POST['foo']'  ";
> 
> without getting an error ??
> should I append it as $var= $_POST['foo']; before???
>

The rule of thumb I follow with these and other Associative Arrays is:

when setting the variable its $_POST['foo']
when accessing the variable its $_POST[foo]

so it your example it would be:
$sql = "select * from db where apple = '$_POST[foo]'";
 
-- 
Tom Woody

In a world without boundaries why
do we need Gates and Windows?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to