Hi all,
Was just wondering when posting a variable such as
<input name="" id="hidden" value="">
is it possible to obtain the id value similar to getting the name and value in the page that it is posted too?
Thanks for your time
Jose
Quick PHP question
Moderator: General Moderators
- Sevengraff
- Forum Contributor
- Posts: 232
- Joined: Thu Apr 25, 2002 9:34 pm
- Location: California USA
- Contact:
Yes it is possible to get variables from hidden form elements.
Here is an example:
On the same page add the following within the body of the page:
Here is an example:
Code: Select all
<form action="" method="post">
<input name="hidden" type="hidden" value="this is the hidden variable">
<input type="submit" name="submit" value="Get the hidden variable">
</form>Code: Select all
<?php
if ($submit){
echo "$hidden";
}
?>- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK