PHP Redirect dynamic insertion?

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Guest
I am tryign to pass an insertion from the URL

ex: www.google.com/?b=2

into a php redirect, but am getting a parse error. How do I do this?
 
parse error are very simple to diagnose. Please edit the post and add the exact code you're using. I'll check the page again and tell you the problem.


passing one from the URL would be through a get:
you would do so (pretending you own google.com)

$redirect = htmlentities(strip_tags(trim($_GET['b']))); //the three functions for security.
header("Location: $redirect");
 
Back
Top