Page 1 of 1

cannot display data?

Posted: Sat May 15, 2004 10:40 am
by teckyan888

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?

Posted: Sat May 15, 2004 10:44 am
by markl999
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']

Posted: Sat May 15, 2004 12:08 pm
by teckyan888
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?

Posted: Sat May 15, 2004 12:13 pm
by markl999
Change ?UserName to &UserName

Posted: Sat May 15, 2004 12:19 pm
by teckyan888
It works already...Thanks mark999....