Jump to content

[SOLVED] help, how to send variable from form1 to form 2 in one page


air_tebu

Recommended Posts

You can do it like this

for first page

<table width="100%">
<form name="contact" action="otherpage.php" method="post">
<input name="i_am_hidden" type="hidden" value="1" />
<input type="submit" value="Submit" name="submit">
</form>
</table>

 

and other page

<?php
if(isset($_POST['i_am_hidden']) )
{
$val = $_POST['i_am_hidden'];
echo $val;
}
else
{
echo "I didn't get the value...";
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.