RE: [PHP] Passing variables with a href hyperlinks

From: Date: Sat, 26 Apr 2003 00:43:50 +0000
Subject: RE: [PHP] Passing variables with a href hyperlinks
Groups: php.general 
Request: Send a blank email to php-general+get-145325@lists.php.net to get a copy of this message
Thank you SOOOOOOO Much Jennifer. Would u believe this has taken me 4 hours to sort out. It was the quotation marks I was leaving in the $row[bugid] (the one straight after the ?) that was messing me up. Something so small can cause so much irritation......
From: "Jennifer Goodie" <goodie@apollointeractive.com> To: "Bobby Rahman" <bobby_rahman2002@hotmail.com>, <php-general@lists.php.net> Subject: RE: [PHP] Passing variables with a href hyperlinks Date: Fri, 25 Apr 2003 16:58:27 -0700 A GET is a type of request, just like POST. When stuff is tacked on to a URL as a querystring (i.e. ?blah=1&grep=2) you have stuff in $_GET. Since you are using $row['bguid'] for the label of you link, I am assuming that is the value you want to pass. so <a href=\"view_bug.php?bugid==$row[bugid]\">" . $row['bugid'] . "</a></font></td> should work. And on view_bug.php the bug id will be in $_GET[bugid] because you are passing it as a GET. -----Original Message----- From: Bobby Rahman [mailto:bobby_rahman2002@hotmail.com] Sent: Friday, April 25, 2003 4:54 PM To: php-general@lists.php.net Subject: [PHP] Passing variables with a href hyperlinks Hiya Im having troubles sending a page with a variable. I have tried numerous ways suggested by forums. Now its driving me mad. The situation: I have a page with a table where there is a column bugid. In the browser I can see all the bugids as hyperlinks which directs to view_page.php. Now when I press on the link It goes to the page but without the variable bugid....so there is no way of knowing which bugid I clicked on. this is the link that creates all the bugid as links: <a href=\"view_bug.php\">" . $row['bugid'] . "</a></font></td> now to get the variable bugid which has been selected I assume I need to use a question mark. <a href=\"view_bug.php?\">" . $row['bugid'] . "</a></font></td> now I want the bugid so put in: <a href=\"view_bug.php?bugid=$_GET['bugid']\">" . $row['bugid'] . "</a></font></td> But this doesnt return anything in the URL. If this worked I would expect to see something like this in the url view_bug.php?bugid="0000001" I think the problem is something to do with $row['bugid']...is there anyway I can GET what is stored in this? Any help would be very appreciated -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/mobile

« previous php.general (#145325) next »