Login Script...
Posted: Sat Mar 20, 2004 10:34 pm
Ok, i'm having trouble with my login script... perhaps someone can help me out. Below is the script I currently have....
If anyone can help me in any way that'd be very helpful 
Code: Select all
<?php
$dbh=mysql_connect ("localhost", "equestra_test", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("equestra_members");
$username = $HTTP_POST_VARSї'txtName'];
$password = $HTTP_POST_VARSї'txtPassword'];
$rs = mysql_query("SELECT * FROM myUsers WHERE Name = '$username' AND Password = '$password' ");//if the user exists if (mysql_num_rows($rs)>0){ //make a cookie for the user setcookie("loginname",$username);} ?>