Re: Begining PHP...Have Questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx

The chief cause of problems is solutions.
		-- Eric Sevareid 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux