...

View Full Version : Simple go-to link



restinpieces
06-23-2006, 08:18 AM
The principle of this is as follows:
- user imputs his url into a textfield (or textarea) and presses button
- my url is added in front of his :http://myurl.com?http://hisurl.com
- he goes to his imput page (without opening in another page)

Could somebody guide me into doing this?

_Aerospace_Eng_
06-23-2006, 08:45 AM
<?php
if(isset($_POST['submit']) && $_POST['submit'] == 'Go')
{
$yoursite = 'http://www.yoursite.com/?';
$url = $_POST['url'];
header('Location: '.$yoursite.$url.'');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
<input type="text" name="url" id="url" /><input type="submit" name="submit" value="Go" />
</form>
</body>
</html>

restinpieces
06-23-2006, 08:54 AM
thanks so much, you're the man :)

restinpieces
06-23-2006, 09:02 AM
nvm.. figured it out



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum