Hi all,
Well, actually my question isn't really "How to do", but "How to do it easier"...
What I want :
- A link on every page of my site that should define a GET variable. By clicking on that link from this page, we'd get the following page :
- The variable should then be transmitted from page to page each time I click a link on any page. So, if I click on a link to "main.php" from this page, I'd get the following page :
I know it can be done by :
- Using 10's of lines of code that will get the URL, look for ? and &... , and replace depending on what it find... etc.
- Modify each single A HREF by links generated with PHP.
But I am sure there's a simplier way that I just don't now...
Thanks for any help
Simo
Motherboard: Asus CUSL2
Proc: PIII 733MHz
Mem: 256Mb SDRam PC133
Video: ATI All In Wonder 128 Pro (IRQ11)
Sound: SB Live Value (IRQ9 shared with modem and both LAN cards, it's always been like that but it used to work b4)
LAN+Modem: 10/100PCI - 10PCI - 56K
IDE: DVD16x - CD.RW 12.10.32 - 3½ - Master 30Gb 7200rpm - Sla
Well, actually my question isn't really "How to do", but "How to do it easier"...
What I want :
- A link on every page of my site that should define a GET variable. By clicking on that link from this page, we'd get the following page :
Code:
index.php >> index.php?var=1
index.php?a=b >> index.php?a=b&var=1
index.php?var=2&a=b >> index.php?var=1&a=b
- The variable should then be transmitted from page to page each time I click a link on any page. So, if I click on a link to "main.php" from this page, I'd get the following page :
Code:
index.php >> main.php
index.php?a=b >> main.php
index.php?var=2&a=b >> main.php?var=2
I know it can be done by :
- Using 10's of lines of code that will get the URL, look for ? and &... , and replace depending on what it find... etc.
- Modify each single A HREF by links generated with PHP.
But I am sure there's a simplier way that I just don't now...
Thanks for any help
Simo
Motherboard: Asus CUSL2
Proc: PIII 733MHz
Mem: 256Mb SDRam PC133
Video: ATI All In Wonder 128 Pro (IRQ11)
Sound: SB Live Value (IRQ9 shared with modem and both LAN cards, it's always been like that but it used to work b4)
LAN+Modem: 10/100PCI - 10PCI - 56K
IDE: DVD16x - CD.RW 12.10.32 - 3½ - Master 30Gb 7200rpm - Sla