unable to pass $submit variable
| From: | CHAN YICK WAI | Date: | Thu, 05 Aug 2004 03:23:55 +0000 |
| Subject: | unable to pass $submit variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-192795@lists.php.net to get a copy of this message | ||
Hi,
I learn to write a small PHP form with "submit" button for different actions, however, it
seems to me variable can't be passed. Any experience can share for my debugging?
Thanks, Yw
The script is as simple as ...
===
<html>
<head></head>
<body> ......
<?php
function newform() {
something.....
?>
<table> ... <form>
<input type=submit name=action value=print>
</form>
....
</html>
<?php
}
function printform() {
something .....
?>
<table> ... <form>
<input type=submit name=action value=confirm>
</form>
....
</html>
<?php
}
if ($action=="print") { printform(); } else ( newform(); }
?>
===