php variables in sql statements.
| From: | Matt Davis | Date: | Mon, 19 Feb 2001 16:05:03 +0000 |
| Subject: | php variables in sql statements. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-40582@lists.php.net to get a copy of this message | ||
Can someone tell me if this is possible.
I have a PHP variable which i got from a html form using $HTTP_POST_VAR. I
collect a variable called Community. Therefore is it possible to have an sql
statement like this?
//create sql statement
$sql = "select businessname from main where businesstype =
'consultancy' and $community != '0'";
if this is not ok how else can i extract a variable from another html page.
Matt.