Re: [PHP] Adding Querystrings to links
On Monday, April 8, 2002, at 11:12 AM, <[EMAIL PROTECTED]> wrote: > I have a problem with the querystring.I want to add to every Link on my > Homepage a querystring, but i should have the possibility to change some > details in the Querystring. > How should i solve this problem ? > > Example : > > http://domain.com/index.php?dest=12&item=2 > The variables "?dest=" and "&item=" should be in every Link on my > site.But only the values "12" and "2" should be alterable. Here is an example: $destination = 12; $item = 12; // later in the script print("http://domain.com/index.php?dest=$destination&item=$item\";>Link "); Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Adding Querystrings to links
you want to try a code line like this print "LinkName"; it will only work of course if you are in the middle of a loop that processes the results of an appropriate select statement that pulls the needed values for your dest and item variables. for a similar project I wrote this: for ($i=0; $i < $rowcount; $i++) { $line = mysql_fetch_array($results); if ($i % 2) { print "\n"; } else { print "\n"; } print "$line[projectname]\n"; print "$line[projectcustomer]\n"; print "$line[projectstatus]\n"; print "$line[projectcompletion]%\n"; print "\n"; } Hope it helps Rance Hall 308.238.2455 Internal Office Extensions: 2455 or 6655 PC Programmer, The Buckle, Inc. [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 10:12 AM To: [EMAIL PROTECTED] Subject: [PHP] Adding Querystrings to links Hi all! I have a problem with the querystring.I want to add to every Link on my Homepage a querystring, but i should have the possibility to change some details in the Querystring. How should i solve this problem ? Example : http://domain.com/index.php?dest=12&item=2 The variables "?dest=" and "&item=" should be in every Link on my site.But only the values "12" and "2" should be alterable. Thank you,and sorry for my bad english Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php