fileupload
New Member
- Messages
- 3
- Reaction score
- 0
- Points
- 0
I am following login tutorials on the internet and it comes up with this error code:
Parse error: syntax error, unexpected T_STRING in /home/file1234/public_html/do_login.php on line 35
and here is the code could you help me out:
<html>
<head>
<title>Login</title>
<body bgcolor="#009933">
</head>
<body>
<br><br>
<font color="white"><center><h1>FileFlame.Pcriot.Com</center></font></h1>
<br><br>
<DIV ALIGN=LEFT>
<FORM>
<INPUT TYPE="BUTTON" VALUE="Home" ONCLICK="window.location.href='index.php'">
<INPUT TYPE="BUTTON" VALUE="Register" ONCLICK="window.location.href='register.php'">
<INPUT TYPE="BUTTON" VALUE="Login" ONCLICK="window.location.href='login.php'">
<INPUT TYPE="BUTTON" VALUE="Search" ONCLICK="window.location.href='browse.php'">
<INPUT TYPE="BUTTON" VALUE="News" ONCLICK="window.location.href='news.php'">
</FORM>
<br><br>
<?php
$connection = mysql_connect(localhost, prefix_user, password);
$db = mysql_select_db(prefix_dbname, $connection);
$sql = "SELECT id FROM user
WHERE username='$_POST[username]'
AND PASSWORD='$_POST[password]'";
$result = mysql_query ($sql);
$num = mysql_num_rows($result);
if ($num > 0) (
//USER AND PASS ARE CORRECT
$id = mysql_fetch_assoc($result))
header("Location: main.php");
} else {
header ("Location: incorrect.php");
};
?>
Successful Login, click <INPUT TYPE="BUTTON" VALUE="here" ONCLICK="window.location.href='index.php'"> to go back home
<font color="#ffffff"><font size='+1'><strong><br><center>Copyright © 2010-2014 FileRiver. All Rights Reserved.</font>
</body>
</html>
Parse error: syntax error, unexpected T_STRING in /home/file1234/public_html/do_login.php on line 35
and here is the code could you help me out:
<html>
<head>
<title>Login</title>
<body bgcolor="#009933">
</head>
<body>
<br><br>
<font color="white"><center><h1>FileFlame.Pcriot.Com</center></font></h1>
<br><br>
<DIV ALIGN=LEFT>
<FORM>
<INPUT TYPE="BUTTON" VALUE="Home" ONCLICK="window.location.href='index.php'">
<INPUT TYPE="BUTTON" VALUE="Register" ONCLICK="window.location.href='register.php'">
<INPUT TYPE="BUTTON" VALUE="Login" ONCLICK="window.location.href='login.php'">
<INPUT TYPE="BUTTON" VALUE="Search" ONCLICK="window.location.href='browse.php'">
<INPUT TYPE="BUTTON" VALUE="News" ONCLICK="window.location.href='news.php'">
</FORM>
<br><br>
<?php
$connection = mysql_connect(localhost, prefix_user, password);
$db = mysql_select_db(prefix_dbname, $connection);
$sql = "SELECT id FROM user
WHERE username='$_POST[username]'
AND PASSWORD='$_POST[password]'";
$result = mysql_query ($sql);
$num = mysql_num_rows($result);
if ($num > 0) (
//USER AND PASS ARE CORRECT
$id = mysql_fetch_assoc($result))
header("Location: main.php");
} else {
header ("Location: incorrect.php");
};
?>
Successful Login, click <INPUT TYPE="BUTTON" VALUE="here" ONCLICK="window.location.href='index.php'"> to go back home
<font color="#ffffff"><font size='+1'><strong><br><center>Copyright © 2010-2014 FileRiver. All Rights Reserved.</font>
</body>
</html>