Not able to get the POST values

Discussing Html . Code , Software , other

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 139
Joined: Mon Nov 15, 2010 12:11 am

Wed Dec 22, 2010 7:31 am

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

//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">
<td class="bold">User Name &nbsp;&nbsp;</td>
<td><input name="txtUserName" id="txtUserName" type="text" /></td>
<td class="bold">Password &nbsp;&nbsp;</td>
<td><input name="txtPassword" id="txtPassword" type="password" /></td>
<td colspan="2" align="center">
<input onclick="javascript: return Validate();" name="btnLogin" id="btnLogin" type="submit" value="Login" /> </td>

Post Reply