Although on my host i was able to utilize this script in its entirety, i cannot use it on godaddy servers. If anyone has any help it would be greatly appreciated.
<?php
require "connect.php";
$sql="SELECT username,password,type FROM users WHERE username='".$_POST['username']."'";
$result = mysql_query($sql,$db);
@$row = mysql_fetch_row($result);
if ($row)
{
if($row[0] == $_POST['username'] && $row[1] == $_POST['password'] {
$_SESSION['username'] = $username;
if ($row[2]==1) { echo "<span class=access>Accessing Your Administrative Account...</span>\n<form name='form' action='admin.php'></form>"; }
else {
echo "<span class=access>Accessing Your Account...</span>\n<form name='form' action='user.php'></form>";
}
}
else
echo "Invalid Password, please contact the Administrator";
}
else
echo "Username not found, please contact the Administrator";
?>
<SCRIPT LANGUAGE="JavaScript">
setTimeout('document.form.submit()',3);
</SCRIPT>
session_start is on top
Error is a parse error regarding ";" unexpected in the following
$_SESSION['username'] = $username;