[php]
x = <?php echo "$number"; ?>
The above code does not display anything from the code: <?php echo "$number"; ?>
Why is that? What is wrong? Thank you in advance!
[php]
x = <?php echo "$number"; ?>
The above code does not display anything from the code: <?php echo "$number"; ?>
Why is that? What is wrong? Thank you in advance!
You need to move your php code where you calculate $number above the html form.
Just needs to be above the html.
hello Addeman, you have to did two changes 1. place your php code above the tag. but if you do not want than it's ok. 2. you are missing ; in action attribute of form. replace action="<?=$_SERVER['PHP_SELF']?>" with below code action="<?=$_SERVER['PHP_SELF'];?>"other than this everything is fine.
SR
If he wants the variable to show up when he hits submit, then the php has to be on top of the page, or at least above the form.