Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- variable vs URL
July 12, 2004, 12:27 am
rate this thread
It's probably very easy, but I cannot find my mistake:
echo "<a href=page2.php?vartrans=5342>Clic</a>";
When I click on the link on page 1, page 2 appears on the screen but with
the following error message:
Notice: Undefined variable: vartrans in c:\program
files\easyphp1-7\www\page2.php on line 2
What's my mistake?
I use php 4.3.3.
Thank you vm in advance for your help
Re: variable vs URL
You're relying on register_globals being on, and they're off.
Use the superglobal array $_GET instead.
<?php // page2.php
read all about it at
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |