I have been trying to make simple php login script where I have a html form point to a php script to make a simple login. I have a MySQL table called tbUser.
My form is called "USER_DATA" and its action is "post" and it points to login.php.
Login.php looks like this.
//Begin login.php
<?php
if(!empty($result)){
$USER_DATA = mysql_fetch_array($result);
setcookie ("userID", $USER_DATA["ID"]);
header("location:member.htm");
}else{
header("index.htm");
}
?>
//End login.php
My MySQL database table is called tbUSER
it looks like this:
Name VarChar100 PrimaryKey
Password VarChar100
DateCreated DateTime
LastLogin DateTime
Thats all it is, and my html for is correct as is my member.htm page. When I enter the correct user details (that i have entered using PHPMyAdmin the login.php script refers me back to index.htm except the url that IE shows is:
http://boggdin.ifreepages.com/index.htm?name=[username]&password=[password]
except with [username] and [password] being my username and password (which i would rather not disclose 😉 )
Can anyone give any sort of help or refer me somewhere. I know it is probably some stupid little thing, but i'm really loosing sleep over this one. Thanks.