View Single Post
Old June 16th, 2006, 11:55 PM  
Just...Will
Awesome Poster
 
Just...Will's Forum Picture
 
Join Date: November 19, 2004
Location: Bout a half hour west of Cleveland, OH
Age: 24
Gender: Male
Default PHP help, please.

Code:
<?php $name = $_POST['name']; $pass = $_POST['password']; $connid = mysql_connect ('localhost' , 'DBUSER' , 'DBPASS'); mysql_select_db ("laughsap_jokes"); $dbuser = mysql_query ("SELECT username FROM users WHERE username LIKE $name WHERE password LIKE $pass") or die("Login failed."); $dbpass = mysql_query ("SELECT password FROM users WHERE username LIKE $name WHERE password LIKE $pass");
if
($name == $dbname && $pass == $dbpass)
{ print "Login Successful"; setcookie ("laplogin", "Logged in", time( ) + 500000);
}
else
{ print "Login failed."; } ?>
It's a login script, but I fear I've done my SQL Queries incorrectly. Some help would be appreciated.

-WILL

Je vais t'aime toujours.
Meme si tu ne m'aimes pas.
Rappeles-tu toujours ca.
Llama.

http://stardate.org/nightsky/moon/moon13.gif
Just...Will is offline