I am trying to grab variables from a text url, and discard certain ones..
ie. I have the following: $dest=http://www.domain.com/productinfo.php?id=1&sid=abcde12345&prodid=884
I want to be able to take this variable and make it look like:
$dest=productinfo.php?prodid=884
That is, remove the initial "http://xxx/" part and remove any variables contained in the string that are "id=x" or "sid=xxx", leaving any other variables there. Strings may contain the variables in any order (ie. the above could look like: http://www.domain.com/productinfo.php?id=1&prodid=884&sid=abcde12345).
How can I do this?
easy
after the values have been posted simply
<? $newdest = "productinfo.php?prodid=".$prodid; ?>
if this is not what you mean then let me know.