RE: [PHP] variables in not working in next page
| From: | Martin Towell | Date: | Fri, 09 May 2003 06:42:18 +0000 |
| Subject: | RE: [PHP] variables in not working in next page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146973@lists.php.net to get a copy of this message | ||
page1.html:
<a href="page2.html?member=<?= $username; ?>">link</a>
This should work if you have register_globals=on
page2.html:
Member = <?= $member; ?>
Or you can try this
page2.html:
Member = <?= $_GET['member']; ?>
-----Original Message-----
From: christian tischler [mailto:christian@tischler.co.uk]
Sent: Friday, May 09, 2003 4:36 PM
To: php-general@lists.php.net
Subject: [PHP] variables in not working in next page
I try to retrieve some data from mysql database and display it an page 1.
This page should have one field, say the username, displayed as a link. I
also define avariable $member=$username, which works fine on page 1 but will
not be available on page 2 which then should get all information about this
user from the database.
Everything else works fine, it's just the variable $members is not available
for page 2.
I tried to make the variable global - no success.
Do I need a form to "hand over" a variable o the next page?
I hope you get what I am trying to do. Please help.
Christian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php