Form action on the same page
Posted: Mon Aug 18, 2008 5:59 pm
I've been reading about how to do this, and can't find a decent answer.
I want to use a form to post some information to a php function on the same page. How do I do this?
Something like:
<html>
<form method="post" action="#">
<input type="text" name="parameter">
<input type="submit" name="Calculate"
</form>
<?php
- the php code that uses 'parameter' and does something with it -
?>
</html>
Thanks
G
I want to use a form to post some information to a php function on the same page. How do I do this?
Something like:
<html>
<form method="post" action="#">
<input type="text" name="parameter">
<input type="submit" name="Calculate"
</form>
<?php
- the php code that uses 'parameter' and does something with it -
?>
</html>
Thanks
G