Preserved Topic: Grabbing two variables using .shtml?var1=foo&var2=bar |
|
---|---|
Author | Thread |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 02-14-2002 03:01
Say, I'm going to be setting up a new website tomorrow, and I need to do something that I always over-complicate, I *know* there's easy enough ways to do this! I have most of my script set up with XSSI for apache (.shtml), and I send along a variable in the url like http://blah.com/?page1 - and then I can easily get that variable like this... |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 02-14-2002 03:43 |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 02-14-2002 07:53
This can't be done with SSI/XSSI. You can experiment with IF statements but since you would need to include all situations you would probably end up with extremely large and extremely unreadable code (and not to mention almost impossible to write)... |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 02-14-2002 08:55
The poster has demanded we remove all his contributions, less he takes legal action. |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 02-14-2002 21:55
Yah, I'll re-write things to use PHP, I was just wondering, seems to me I worked this out once, grabbing the variables and then hacking them apart with Javascript, it was a mess, yuck. (It worked, though, heh.) I don't need to write too much, what I need it to do is pretty simple, one more enhancement on my patented "one page website" (that will nevertheless have 6 different sidebars and about 50 pages of included content), yah! I'll have fun. |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 02-16-2002 07:50
OK, I RTFM, and managed to do something rather elegant, methinks! PHP is very sweet, it makes passing variables from one included page to another uneccessary, and I was able to do yet another "one page website" that now has 6 top levels, each with 3-5 sub-levels. It's actually built from a whole bunch of little pages, the main page, "test.php" holds all of the main framework, and if it gets a top level variable it'll grab the same named page from the sub-level directory of content files, and use these values to lock the mouseovers for those values. The sidebars are built from simple TXT files, nothing more than the names of the sub-levels in quotes, seperated by commas, then Javascript outputs them, with the links and the mouseover code, sweet! If I want to add a new page, all I need to do is change that one file, add an image with that name and a TXT content file, also with that name (different directories.) If I want to shuffle things around, I switch the order in the array, neato-keen! |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 02-16-2002 07:56
OK, here's some code... |