Input form and assign new URL to variable

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
somdcomputerguy
New php-forum User
New php-forum User
Posts: 14
Joined: Tue Oct 04, 2011 6:50 am
Location: West Virginia
Contact:

Sun Sep 29, 2013 7:34 pm

This should give you the full URL of the page you're at, I don't know if this is what you need though..

Code: Select all

echo $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

developerahusain
New php-forum User
New php-forum User
Posts: 44
Joined: Tue May 28, 2013 10:04 pm
Location: India,Lucknow

Sun Sep 29, 2013 9:38 pm

This is simple here is the code
<? if ($_POST ['b_submit']) {
echo "<script language='javascript'>window.location='http://www.yellowpages.vn/vn/q5551/".$_POST ['inp']."'</script>";
} ?>
<form name="asdf" method="post">
<input type="text" name="inp"><input type="submit" name="b_submit" value="Submit">
</form>

developerahusain

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest