holyearth Posted December 19, 2006 Share Posted December 19, 2006 Hello,I'm trying to pass a url thru for redirection....example....http://www.example.com/index.php?r=http://www.google.comI must pass it thru that way...Here's my code but it's not working....[code]<?php$data = urlencode($HTTP_GET_VARS['r']);?><HTML><HEAD><META HTTP-EQUIV=Refresh CONTENT="0; URL=<? echo("$data"); ?>"></HEAD></HTML>[/code]I think the urlencode is wrong??Please help. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/31253-url-passthru/ Share on other sites More sharing options...
alpine Posted December 19, 2006 Share Posted December 19, 2006 if you echo it you will se that it's transformed to [color=red]http%3A%2F%2Fwww.google.com[/color]try [color=blue]$data = htmlspecialchars($_GET['r']);[/color] instead, and if there is no particular reason, quit the habit of using older predefined variables ($HTTP_*_VARS) and start using $_GET, $_POST etc. instead. Link to comment https://forums.phpfreaks.com/topic/31253-url-passthru/#findComment-144593 Share on other sites More sharing options...
m1rkd1rk Posted December 19, 2006 Share Posted December 19, 2006 I recommend using PHPMyAdmin to delete records in a table. If you are on a webhost, ask about it, if not download it and install it. Link to comment https://forums.phpfreaks.com/topic/31253-url-passthru/#findComment-144665 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.