Creator-X
11-04-2004, 04:51 AM
Hello Guys I need some help again. Im quite new to PHP but im Ok with JAVA JSP stuff
so back to the problem i have one form with three submit buttons in form
<form name="frmOne" method="post" action="process.php">
<input name="txtName" type="text" id="txtName" size="65" maxlength="65" />
<input name="Post" type="submit" value='First' />
<input name="Post" type="hidden" value='First' />
<input name="Post" type="submit" value='Second' />
<input name="Post" type="hidden" value='Second' />
<input name="Post" type="submit" value='Third' />
<input name="Post" type="hidden" value='Third' />
</form>
This above is the example now all works fine except one thing
when i use : <?PHP print $_POST['Post']; ?> To see which button was clicked regardless which one i click the value "Third" is always displayed or it always displays the value of last button not the one that was clicked.
How to work this out does anybody know Thanks in advance
so back to the problem i have one form with three submit buttons in form
<form name="frmOne" method="post" action="process.php">
<input name="txtName" type="text" id="txtName" size="65" maxlength="65" />
<input name="Post" type="submit" value='First' />
<input name="Post" type="hidden" value='First' />
<input name="Post" type="submit" value='Second' />
<input name="Post" type="hidden" value='Second' />
<input name="Post" type="submit" value='Third' />
<input name="Post" type="hidden" value='Third' />
</form>
This above is the example now all works fine except one thing
when i use : <?PHP print $_POST['Post']; ?> To see which button was clicked regardless which one i click the value "Third" is always displayed or it always displays the value of last button not the one that was clicked.
How to work this out does anybody know Thanks in advance