amir4oracle
Programmer
How can we pass value of $x php variable embedded in html form section to php section (or form process section)?
The simple version of the code (register.php) is as follows :
In this case the value of emal_addr passes and echoes fine but how can we pass and echo the value of a php variable $x in this case to the php section.
Your help is highly appreciated as always thanks in advance.
Best regards,
Amir Khan
The simple version of the code (register.php) is as follows :
Code:
<?php
//[b]php section[/b]
if (isset ($_POST['submit']))
{
$emal_addr = $_POST['emal_addr'];
echo "$emal_addr";
[b] echo "$x";[/b]
.
.
}
?>
[b]html form section[/b]
<form action="register.php" method="post">
<input type="text" name="emal_addr" value="<?php echo $_POST['emal_addr']; ?>"/>
<?php
[b] $x = 7;[/b]
?>
.
.
<input type="submit" value="Submit" name="submit">
</form>
In this case the value of emal_addr passes and echoes fine but how can we pass and echo the value of a php variable $x in this case to the php section.
Your help is highly appreciated as always thanks in advance.
Best regards,
Amir Khan