header php function challenge
Posted: Fri Mar 03, 2006 4:48 pm
I'd like to use the header php function
to redirect to any given url.
But I ran into a problem. Check this:
My link.html code is simply this:
<?php
$link = $_GET['pg'];
header("Location: $link");
?>
<html>
<p><a href="<?=$link?>">Click Here</a></p>
</html>
Oughta work, eh?
But when I use this URL:
http://www.americanprogressaction.org/s ... ct=2026855
in a call like this:
http://www.webwisesage.com/link.html?pg ... ct=2026855
it gets a bad page address, whereas the page at the url is fine!
Any ideas?
...Vidya
http://www.webwisesage.com
to redirect to any given url.
But I ran into a problem. Check this:
My link.html code is simply this:
<?php
$link = $_GET['pg'];
header("Location: $link");
?>
<html>
<p><a href="<?=$link?>">Click Here</a></p>
</html>
Oughta work, eh?
But when I use this URL:
http://www.americanprogressaction.org/s ... ct=2026855
in a call like this:
http://www.webwisesage.com/link.html?pg ... ct=2026855
it gets a bad page address, whereas the page at the url is fine!
Any ideas?
...Vidya
http://www.webwisesage.com