Not able to get the POST values

A

Anonymous

Guest
hey Kshitiz,
u r getting the form posted value bt u hv nt printed it and instead of txtbox name use submit btn name.
try this

<?php
if(isset($_POST['btnLogin']))
{
//Put Your code Here
echo $userService = $_POST['txtUserName'];
echo $txtPassword = $_POST['txtPassword'];

}
?>
<form name="login" action="" method="post" onsubmit="javascript: alert('form submitted');">
<table class="tableWithBorder" width="100%" align="center" cellpadding="5" cellspacing="5">
<tr>
<td class="bold">User Name   </td>
<td><input name="txtUserName" id="txtUserName" type="text" /></td>
</tr>
<tr>
<td class="bold">Password   </td>
<td><input name="txtPassword" id="txtPassword" type="password" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<input onclick="javascript: return Validate();" name="btnLogin" id="btnLogin" type="submit" value="Login" /> </td>
</tr>
</table>
</form>
 
Back
Top