stoodder
03-14-2003, 11:58 PM
okay guys ive made a use register for my saite it seemed to work perfectly i mean i got it to set the database and what not but now when they loggin i getthe stupid parse error!!!
heres the page if you need it: http://www.shadowgelert.com/myweb6
here is the login pages html
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<?php $title = "Members Login"; ?>
</head>
<body>
<form method="post" action="?page=login2">
Enter your User Name <input type="text" name="Name" size="20"><br>
Enter you Password <input type="password" name="Password" size="20"><br>
<input type="submit" name="submit">
</form>
</body>
</html>
heres the code for the page after you would hit the loggin button
<?php
$title = "Logged In";
include("common.php");
if(!($link_id = mysql_connect($Host, $User, $Pass))) die(mysql_erorr());
mysql_select_db($DB);
$sql = "SELECT ID FROM " . $Table . " WHERE Name='" . addslashes($_POST['Name']) . "' AND Password='" . md5($_POST['Password']) . "' LIMIT 1";
if(!($result = mysql_query($sql))) die(mysql_error());
if(mysql_num_rows($result) == 1) {
setcookie("LoggedIn, TRUE, time()+(3600 * 24));
echo"You Are Now Logged In";
} else {
echo"Login failure";
}
?>
I need help please
heres the page if you need it: http://www.shadowgelert.com/myweb6
here is the login pages html
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<?php $title = "Members Login"; ?>
</head>
<body>
<form method="post" action="?page=login2">
Enter your User Name <input type="text" name="Name" size="20"><br>
Enter you Password <input type="password" name="Password" size="20"><br>
<input type="submit" name="submit">
</form>
</body>
</html>
heres the code for the page after you would hit the loggin button
<?php
$title = "Logged In";
include("common.php");
if(!($link_id = mysql_connect($Host, $User, $Pass))) die(mysql_erorr());
mysql_select_db($DB);
$sql = "SELECT ID FROM " . $Table . " WHERE Name='" . addslashes($_POST['Name']) . "' AND Password='" . md5($_POST['Password']) . "' LIMIT 1";
if(!($result = mysql_query($sql))) die(mysql_error());
if(mysql_num_rows($result) == 1) {
setcookie("LoggedIn, TRUE, time()+(3600 * 24));
echo"You Are Now Logged In";
} else {
echo"Login failure";
}
?>
I need help please