Hi there, ive been programming for a while and getting my bearings now on php. Im writing a login bit of code and want to know how to approach it.
I have a databse with a list of Users. The user enters their Username, pass. This is checked through mysql as
$query = "SELECT Username, Password FROM User WHERE Username='$Username' AND Password='$Password'";
In jsp you can simply run the query if it fails, tehre is no match, if it passes then proceed.
I havent been able to do this so far in PHP. What is the easiest wy of doing it? If some one could explain if this is a right or wrong notion.
And my next quesion is how do i pull out a field from the returned resultset. Ill have say Username and password being fed back as a result set. How do i extract them? i tried
$Username = mysql_result($result, 0, "Username");
Thank you 🙂