Hello I'm new here... need help guys. Not sure if here is the right place to ask for help.
I'm trying to build a single login form with can be used by different users login into different pages..
But I got this error from apache
Method Not Allowed
The requested method POST is not allowed for the URL /test/index.html.
Apache/1.3.27 Server at localhost Port 80
here's my example code.
<html>
<head>
<title>Username</title>
</head>
<script language="javascript" src="/text">
function Select()
{
if(document.frmLogin.optSelect[0].checked)
{
document.frmLogin.action="/admin/index.php";
document.frmLogin.submit();
}
else if(document.frmLogin.optSelect[1].checked)
{
document.frmLogin.action="/waiter/index.php";
document.frmLogin.submit();
}
else if(document.frmLogin.optSelect[2].checked)
{
document.frmLogin.action="/kitchen";
document.frmLogin.submit();
}
else (document.frmLogin.optSelect[3].checked)
{
document.frmLogin.action="";
document.frmLogin.submit();
}
}
</script>
<body>
<form name="frmLogin" method="post">
<p> </p>
<table align="LEFT" cellpadding="2" cellspacing="0">
<tr>
<td align="right"><font face="Arial">Username:</font></td>
<td><font face="Arial"><input type="text" name="userName" size="20"></font></td>
</tr>
<tr>
<td align="right"><font face="Arial">Password:</font></td>
<td><font face="Arial"><input type="password" name="userPass" size="20"></font></td>
</tr>
<tr>
<td>
<p align="right"><font face="Arial">Type of User:</font></td>
<td><input type="radio" checked name="optselect" value="V2">Admin<input type="radio" name="optselect" value="V5">Waiter<input type="radio" name="optselect" value="V4">Kitchen
<input type="radio" name="R1" value="V5">Cashier </td>
</tr>
<tr>
<td><font face="Arial">Remember this login:</font></td>
<td><font face="Arial"><input type="radio" name="userRemember" value="no" checked>No
<input type="radio" name="userRemember" value="yes">Yes</font></td>
</tr>
<tr>
<td></td>
<td><font face="Arial"><input type="submit" value="Login" OnClick="Select()"></font></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
</body>
</html>
Thanks..