Attila Posted August 22, 2008 Share Posted August 22, 2008 OK trying to use a name that I pull out of a database to go from one page to the next. When it goes to the next page it will pull up that persons blog stuff. Here is the coding I am using on the link they can click on. <? echo '<a href=test1.php?'.$_POST[uname] = $row['maintoonsname'].'>'.$row['maintoonsname'].'</a>' ?> example the toons name is: John. I want John to be hyperlinked to another page in the example above the link is test1.php. When they click on John to go to the next page. I need that name "John" to be put into a variable called Uname so on the next page I can search for John in the database and display all his information. How do I do this? WOW I am confusing myself. You can see a partial example here: http://thaczero.com/test.php Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 22, 2008 Share Posted August 22, 2008 you want this <? echo '<a href=test1.php?'.$_POST[uname] .'='. $row['maintoonsname'].'>'.$row['maintoonsname'].'</a>' ?> but also check out $_SESSION Scott. Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted August 22, 2008 Share Posted August 22, 2008 If I understand you right, you want change your code to: <?php echo '<a href="test1.php?Uname='.$row['maintoonsname'].'">'.$row['maintoonsname'].'</a>' ?> Then on test1.php use the $_GET to plug the $row['maintoonsname'] info into a query to grap the info you need from the db. IE...$_GET['Uname'] Quote Link to comment Share on other sites More sharing options...
Attila Posted August 22, 2008 Author Share Posted August 22, 2008 Thansk that simple stuff did it! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.