Re: Begining PHP...Have Questions

From: Date: Mon, 19 Jul 2004 19:00:37 +0000
Subject: Re: Begining PHP...Have Questions
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-35386@lists.php.net to get a copy of this message
On Mon, 2004-07-19 at 14:08, Aaron Todd wrote: > That makes great sence, however when I tried using $_POST in my SQL > statement it would not work. > > This works fine: > $query = "SELECT * FROM users WHERE email='".$username."'"; > But this one doesnt at all: > $query = "SELECT * FROM users WHERE > email='",$_POST['username'],"'"; ^^ ^^ > > It does however work for all the echo commands and It is also correct when > I echo the statement: > echo "SELECT * FROM users WHERE > email='",$_POST['username'],"'"; > > Am I missing something? > I think you need to use . (period) in place of those , (commas). -- Scot L. Harris webid@cfl.rr.com The chief cause of problems is solutions. -- Eric Sevareid

« previous php.db (#35386) next »