how to read username password combos from a database to verify?

[font=verdana]

Hi,

my goal is to be able to create a web based interface for someone who has no programming skills or interest to be able to maintain a list of usernames and passwords for protecting a page of links on a website.

so, I’ve created a page that can write to a database, and I can see that it is working, I can read entries, etc.

now, I need to know how to make a script that will check against that database for valid UN/PW combinations.

what is the best method for this?

this is the script for writing to the database. [/font]

<?include("dbinfo.inc.php"); mysql_connect($servname,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM $newdbname WHERE id='$id'"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=0; while ($i < $num) { $username=mysql_result($result,$i,"username"); $password=mysql_result($result,$i,"password"); $real_name=mysql_result($result,$i,"real_name"); ?> "> Real Name: ">
Username: ">
Password: ">
<? ++$i; } ?>
Sponsor our Newsletter | Privacy Policy | Terms of Service