I found some canned code and tried to use it to authenticate users on my three computer network at work, unfortunately, it didn't work. So, I went back to basics. 🙂
This is the logical structure I want for my code.
But, I need some help getting started. For example, how do I use the name of the form element (ie. textbox, ect) to assign value to a variable? (Username=UsernameFormFieldValue)
Please help me find direction. I need pointers on this.
<pre>
<?php
$link = mysql_connect();
mysql_select_db("shp", $link);
while (username variable != empty) and (password variable != empty)
display login html form
query = locate username variable in db
if username variable valid
check password against it's password entry
if password valid
login
redirect to start page for user
else
invalid password
else username does not exist
?>
</pre>