Re: Re: Difference between $_POST[foo] and $_POST['foo']?
| From: | Chris Hayes | Date: | Tue, 17 Jun 2003 14:36:35 +0000 |
| Subject: | Re: Re: Difference between $_POST[foo] and $_POST['foo']? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151836@lists.php.net to get a copy of this message | ||
At 16:19 17-6-03, you wrote:
$sql = 'select * from db where apple = \'' . $_POST['foo'] . '\';'; Like that? you missed some quotes:$sql = 'select * from db where apple = \''' . $_POST['foo'] . '\'"';
A side question along with this ,,, how can I include $_POST['foo'] in the : $sql ="select * from db where apple = '$_POST['foo']' "; or$sql = "select * from db where apple = \"$_POST['foo']\" "; or $sql = "select * from db where apple = \"{$_POST['foo']}\" "; where the {braces} help PHP to distinguish begin and end of an array within double quoted strings