RE: [PHP] Passing variables between pages
| From: | Jay Blanchard | Date: | Tue, 14 Oct 2003 15:20:44 +0000 |
| Subject: | RE: [PHP] Passing variables between pages | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-166079@lists.php.net to get a copy of this message | ||
[snip]
Simple one for anyone who wants to help out a novice. How do you pass a
variable from one page to another?
[/snip]
Through either a $_POST or a $_GET variable array.
onepage.php
<form action="another.php" method="POST">
<input type="text" name="myvariable">
<input type="submit">
</form>
another.php
<?php
echo $_POST['myvariable'];
?>
Please RTFM, STFW, and STFA for PHP tutorials.
Thank you.