Re: Post variables and mysql queries

From: Date: Mon, 27 Oct 2003 17:09:35 +0000
Subject: Re: Post variables and mysql queries
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167747@lists.php.net to get a copy of this message
Luis Lebron wrote: <snip>
If I use the following query string it does not work $query="Select * from users where userid='$_POST['userid']'"; <snip>
Use curly braces to eval array elements inside of a string.... $query = "SELECT * FROM users WHERE userid='{$_POST['userid']}'"; -- By-Tor.com It's all about the Rush http://www.by-tor.com

« previous php.general (#167747) next »