Hi there,
I am doing a school project on inventory management system, running very
short on time. :(
I just completed a php file for authenticating users accessing my site, but
encountered illegal operation when trying to access the file.
please help!!!
<?php
//Starting Session
session_start();
?>
<html>
<head>
<title>
Login Page for Inventory Management System
</title>
</head>
<body>
<form method=post action="sendto.php?<?=SID?>">
<?
//Error Message Section
//this message is if no username/password pair is entered
if ($error==1){
echo "<font color=\"#FF0000\" face=\"arial\" size=\"2\">";
echo "Invalid Login - Please try again";
echo "</font>";
echo "<br>";
session_destroy();
}
//this message is if the wrong username/password pair is entered
if ($error==2){
echo "<font color=\"#FF0000\" face=\"arial\" size=\"2\">";
echo "Unauthorized Access - Please Login";
echo "</font>";
echo "<br>";
session_destroy();
}
//this message is if the cookie has expired
if ($error==3){
echo "<font color=\"#FF0000\" face=\"arial\" size=\"2\">";
echo "Session has expired - Please Login";
echo "</font>";
echo "<br>";
session_destroy();
}
?>
<table>
<tr>
<td>
User Login:
</td>
<td>
<input type="text" name="user_login" size="20">
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<input type="password" name="password" size="20">
</td>
</tr>
</table>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2">
</form>
</body>
</html>
Thanks!!
Alvin
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php