By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,278 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,278 IT Pros & Developers. It's quick & easy.

php URL and variables

P: n/a
Lc
Hi,

It's probably very easy, but I cannot find my mistake:

page1.php

<?php
echo "<a href=page2.php?vartrans=5342>Clic</a>";
?>

page2.php

<?php
echo "$vartrans";
?>

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

Lc
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Mon, 12 Jul 2004 06:48:16 +0200, "Lc" <ho**@not.me> wrote:
<?php
echo "<a href=page2.php?vartrans=5342>Clic</a>";
?>

page2.php

<?php
echo "$vartrans";


use

echo $_GET['vartrans']

instead

Regards

Marian

--
Tipps und Tricks zu PHP, Coaching und Projektbetreuung
http://www.heddesheimer.de/coaching/
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.