Posted: Sat Jul 16, 2005 10:51 am
The posted code still seems to be lacking something, but here's what I think is going on:
1. The invario code, as you already stated, changes ?var=foo&secondVar=bar to ?foo:bar
2. When you explode the query string you get an array with simply [0]=>foo,[1]=>bar.
3. It looks like you need to assume that the first variable is always you "id" so
4. $id=$query[0]
5. This is rather brittle -- you'll have to ensure that the id parameter is always the firsst variable on your query string and its possible that the PHPSESS could get stuck there on occasion. But as long as you're aware of that...
The "better" solution in this situation, does require httaccess (ForceType) to strip the .php from the file and use the URL of the form "domain/scriptname/var1/var2/?trueVariable=foo&secondTrue=bar" that way form generated variables can't interfere with the order dependent pseudo-directory ones. Depending on you hosting provider the ForceType directive may be available, without needing to modify httpd.conf, so this might still be an option.
1. The invario code, as you already stated, changes ?var=foo&secondVar=bar to ?foo:bar
2. When you explode the query string you get an array with simply [0]=>foo,[1]=>bar.
3. It looks like you need to assume that the first variable is always you "id" so
4. $id=$query[0]
5. This is rather brittle -- you'll have to ensure that the id parameter is always the firsst variable on your query string and its possible that the PHPSESS could get stuck there on occasion. But as long as you're aware of that...
The "better" solution in this situation, does require httaccess (ForceType) to strip the .php from the file and use the URL of the form "domain/scriptname/var1/var2/?trueVariable=foo&secondTrue=bar" that way form generated variables can't interfere with the order dependent pseudo-directory ones. Depending on you hosting provider the ForceType directive may be available, without needing to modify httpd.conf, so this might still be an option.