Re: Get "nice" variables from POST
| From: | trlists at clayst dot com | Date: | Fri, 12 Mar 2004 14:22:04 +0000 |
| Subject: | Re: Get "nice" variables from POST | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180254@lists.php.net to get a copy of this message | ||
On 12 Mar 2004 Mike Mapsnac wrote:
> I try to use quotes in the query and this doesn't work.
> $query = "SELECT * FROM user WHERE user_id =
> '$_POST['user_id']}'";
> But you use brackets and it works.. Why do you use brackets ?
> $query = "SELECT * FROM user WHERE user_id = ${_POST['user_id']}";
See http://us3.php.net/manual/en/language.types.string.php,
scroll to
the section called "Complex (curly) syntax".
--
Tom