Re: Select and $_POST

From: Date: Thu, 10 Nov 2005 00:42:45 +0000
Subject: Re: Select and $_POST
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-225484@lists.php.net to get a copy of this message
Ross wrote:
$query = "SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'";
You have to use curly braces in order to interpolate an array: $string = "...{$array['foo']} ..."; By the way, my favorite username is this: chris' -- That's what all my friends call me. :-) Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/

« previous php.general (#225484) next »