Re: [PHP-DB] Returns Blank

2005-01-21 Thread Squeakypants
Lots of people told me about the quote issue. Thanks! One more thing, how do you encrypt a string into the password. In the mysql database it is interperated as a password, so it is a different combination than the actual password. How do I do this in php? -- PHP Database Mailing List

Re: [PHP-DB] Returns Blank

2005-01-20 Thread Martin Norland
Squeakypants wrote: I can't figure this out, it just shows blank... $user=$_POST['user']; $pass=$_POST['pass']; mysql_connect($host,$username,$password); @mysql_select_db($database) or die( Unable to select database); You're suppressing the error returned from mysql_select_db with the @ symbol.

Re: [PHP-DB] Returns Blank

2005-01-20 Thread Andi
Try this $query = SELECT credits FROM krypto WHERE user='$user' AND pass='$pass'; That should work better then the original query... Best regards Andi Squeakypants schrieb: From a forum that recommended this to me, I changed the query execution to this: $query = SELECT credits FROM krypto WHERE

Re: [PHP-DB] Returns Blank

2005-01-20 Thread Martin Norland
Squeakypants wrote: From a forum that recommended this to me, I changed the query execution to this: $query = SELECT credits FROM krypto WHERE user=$user AND pass=$pass; echo query = . $query .\n; $result = mysql_query($query); echo result = . $result .\n; So now it outputs this: query = SELECT

RE: [PHP-DB] Returns Blank

2005-01-20 Thread Bastien Koert
Well, any text elements need single quotes around it for the sql engine to evaluate it properly s/b $query = SELECT credits FROM krypto WHERE user='$user' AND pass='$pass'; to give you query = SELECT credits FROM krypto WHERE user='admin' AND pass='' bastien From: Squeakypants [EMAIL

Re: [PHP-DB] Returns Blank

2005-01-20 Thread franciccio
Squeakypants ha scritto: From a forum that recommended this to me, I changed the query execution to this: $query = SELECT credits FROM krypto WHERE user=$user AND pass=$pass; echo query = . $query .\n; $result = mysql_query($query); echo result = . $result .\n; So now it outputs this: query =

Re: [PHP-DB] Returns Blank

2005-01-20 Thread Chris Ramsay
Personally, I would interpolate the $query and $user string like so: $query = SELECT credits FROM krypto WHERE user='.$user.' AND pass='.$pass.'; Always works for me... rgd chris r. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php