Im trying to create a form which when you enter a website in the field and hit submit it will open the following url:
http://www.mysite.com/at/index.php?url=www.website.com
<form action="http://www.mysite.com/at/index.php?url=" method="post"> <table> <input type="hidden" name="on2" value="Website">[B]Website:[/B]</td></tr><tr><td><input type="text" name="os2" maxlength="60"> </table> <input type="submit" name="submit" value="Submit" alt=""> </form>
Can someone help?
Thanks
if you use GET method in the form, your url variable will automatically inserted into the url.
Thanks, solved, in 2 seconds.
I dont know why I didnt think of this.
Your welcome,
another option should be: once you have posted the form, you can check if that url is a valid url with preg_match() , then redirect with header() location.
header() preg_match()
Thanks again, I'm a beginner with php since I registered at these forums, I've learnt loads. You are all soo helpful, especially when you taught me the $_POST function.
$_POST is a variable <-- explanations.