PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
teckyan888
Forum Commoner
Posts: 40 Joined: Tue May 11, 2004 10:46 am
Post
by teckyan888 » Sat May 15, 2004 10:40 am
Code: Select all
<?php
<a href="product.php?CategoryID=<?php echo $row["CategoryID"];?>?UserName= <?php {$_GET["UserName"]}; ?> ">Select Product</a>
?>
How come i cannot get the UserName from the previous page?Any error in my statement?
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Sat May 15, 2004 10:44 am
To show the CategoryID you do echo $row['CategoryID'], but for the UserName you just do $_GET['UserName'] , ie in the first one you echo, in the second you don't, so try echo $_GET['UserName']
teckyan888
Forum Commoner
Posts: 40 Joined: Tue May 11, 2004 10:46 am
Post
by teckyan888 » Sat May 15, 2004 12:08 pm
Thanks your help...It can work...But when i link to other page,it cannot display again...
Code: Select all
<?php
<a href="style.php?ProductID=<?php echo $row["ProductID"];?>?UserName=<?php echo $_GET["UserName"]; ?> ">Select Style</a>
?>
So,got any solution is better to get the UserName from page to page?
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Sat May 15, 2004 12:13 pm
Change ?UserName to &UserName
teckyan888
Forum Commoner
Posts: 40 Joined: Tue May 11, 2004 10:46 am
Post
by teckyan888 » Sat May 15, 2004 12:19 pm
It works already...Thanks mark999....