Log in

View Full Version : How to write this...



BLiZZaRD
11-25-2007, 05:03 PM
I have a code that checks variables and such and it works great. The problem is I have changed it from the first attempts, and there are some left over bits here and there that I want to remove.

Currently everything makes sense to me and I have changed most of them. I am stuck on one part though, and I am hoping there is a solution.

I have this line:



header('Location: http://' . $_SERVER['HTTP_HOST'] . $p[$_POST['id']][1] . '?var=' . $_POST['var']);


Where it does a self check and if everything is good, it goes back to the page it came from.

The problem is, though that there is no longer a $_GET on the referer page, so I don't need the ?var='.$_POST['var'] part anymore.

I would like for it NOT to show up in the URL after the page name, but all my attempts to remove this line from the header function have failed.

How do I write that header so everything is there except the var part?

thetestingsite
11-25-2007, 05:18 PM
um...if I understand you correctly, this should work:



header('Location: http://' . $_SERVER['HTTP_HOST'] . $p[$_POST['id']][1]);


Hope this helps.

BLiZZaRD
11-25-2007, 05:40 PM
I swear I tried that... must have left something in there.. that was it! Thanks!