Reply to Re: Forms...and WHERE in mysql

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация