Please post the code in the browser in the future:
<?php
IF ($_GET["q"]=="logout"){
setcookie("username", $_POST["username"], time()-3600);
setcookie("password", $_POST["password"], time()-3600);
}
function errorcheck($error){
IF ($error>=1){
echo "<font color="#FF0000">There was an error with either your username or password during the login process. Please try again.</font>";
?>
<html>
<head>
<title>Log in to Merced Trailer Sales Inventory</title>
</head>
<body>
<?php
errorcheck($_GET["error"])
?>
<br />
<form action="inventory.php" method="POST">
Username:<input type="text" name="username" value="" /><br />
Password:<input type="password" name="password" value="" /><br />
<input type="submit" name="login" value="Login" />
</form></body></html>
You need to close the function and the if statement, although I do not see why you have a function here like this...:
<?php
IF ($_GET["q"]=="logout"){
setcookie("username", $_POST["username"], time()-3600);
setcookie("password", $_POST["password"], time()-3600);
}
function errorcheck($error){
IF ($error>=1){
echo "<font color="#FF0000">There was an error with either your username or password during the login process. Please try again.</font>";
} // end if statment
} // end function.
?>
<html>
<head>
<title>Log in to Merced Trailer Sales Inventory</title>
</head>
<body>
<?php
errorcheck($_GET["error"])
?>
<br />
<form action="inventory.php" method="POST">
Username:<input type="text" name="username" value="" /><br />
Password:<input type="password" name="password" value="" /><br />
<input type="submit" name="login" value="Login" />
</form></body></html>