|
Posted by Michael Fesser on 12/31/07 14:52
..oO(Rik Wasmus)
>On Sat, 29 Dec 2007 01:33:01 +0100, Michael Fesser <netizen@gmx.de> wrote:
>
>> $result = mysql_query("
>> SELECT *
>> FROM members
>> WHERE username = '$_POST[username]'
>> ");
>
>Which will probably give a notice the constant 'username' is not defined.
Nope, not in this case. Constants are not resolved in a double-quoted
string (unless you use curly syntax like in the second example).
Whether this syntax is recommended or not is another question, though.
Micha
Navigation:
[Reply to this message]
|