Databases

wxdqz

New Member
I have tried to get a mysql database to work on a remote server but it doesnt! on my server i dont want to pay ?0 to upgrade just to get mysql. So could anyone help me by giving me a script that can make a .txt database and checks it for the username and password of a person. I dont want any fancy features i just want it to check if its right i have one at the moment which is a single username and password form where there is only one password and one username.
Here is the source for that maybe you could work with it?
<?
$mypass = 'qwerty';
$name = 'name';
if (isset($pass)) {
if ($pass == $mypass && $user == $name) {
setcookie ("admin", "yes");
echo "<meta http-equiv='Refresh' content='0; URL=" . $PHP_SELF . "'>";
} else {
echo "Wrong password, try again!<meta http-equiv='Refresh' content='1; URL=" . $PHP_SELF . "'>";
exit;
}
}
?>
In the body section i had
<?
if ((!isset($admin)) && ($admin != "yes")) {
echo "<form name=Login method=post action=" . $PHP_SELF . ">";
echo "<table width=94% border=0 cellspacing=0 cellpadding=0 height=19>";
echo "<tr><td height=21 width=13%><font face=Arial, Helvetica, sans-serif size=1 color=#FF0000>";
echo "Username<br></font></td><td height=21 width=14%><input type=text name=user style=<!-- background-color: #000000; border-style: thin; border-color: #FF9900; font-case: uppercase; font-family: Arial; color: #FF9900 --></td>";
echo "<td height=21 width=5%><font face=Arial, Helvetica, sans-serif size=1 color=#FF0000>Password</font></td><td height=21 width=12%><input type=password name=pass style=<!-- background-color: #000000; border-style: thin; border-color: #FF9900; font-case: uppercase; font-family: Arial; color: #FF9900 --></td><td height=21 width=56%><font face=Arial, Helvetica, sans-serif size=1 color=#FF0000><input onMouseOver=\"this.style.background=\'#FFcc00\'\" onMouseOut=\"this.style.background=\'#FF9900\'\" type=submit name=submit value=http://www.phpbuilder.com/board/archive/index.php/Login style=<!-- background-color: #FF9900; border-style: normal; border-color: #FFcc00; font-case: uppercase; color: #000000; font-family: Arial; roll-over-color: #FF8800 --><font size=2>Dont Have an account? <a href=signupform.htm>Sign Up!</a></font></font></td></tr></table></form>";
exit;
}
?>
Hope you can help!
 
Back
Top