> -----Original Message-----
> From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
> Sent: 30 June 2003 19:10
> 
> Can someone tell me what is wrong with the following querys ?  I am 
> pretty sure its got something to do with the quotes around $_POST[] 
> variables.
> 
> $sql1 = "SELECT * from `admin` where `admin`.user = 
> '"$_POST['validuser']"' AND `admin`.pwd = '"$_POST['password']"'";
> 
> $sql1 = "SELECT * from `admin` where user = "$_POST['validuser']" AND 
> pwd = "$_POST['pass']"";

Too many quotes, not enough curly braces:

  $sql1 = "SELECT * from `admin` where user = '{$_POST['validuser']}' AND
pwd = '{$_POST['pass']}'";

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

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

Reply via email to