Jump to a page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to find a simple way to jump to another page after a user input.


Enter reference : User inputs 1234 Send

User sent to www.mypage.com/1234

Hope this is clear and you may be able to help

I'd like to be able to do it in just HTML
If not javascript or PHP

Many Thanks


Re: Jump to a page

you have to use javascript.

Quoted text here. Click to load it

   .~.    Might, Courage, Vision. In Linux We Trust.
  / v \   http://www.linux-sxs.org
/( _ )\  Linux 2.4.22-xfs
   ^ ^    1:52am up 2:12 1 user 1.00 1.00

Re: Jump to a page

PHP will work even if someone has javascript turned off. Search
www.php.net for the header function.

toylet wrote:

Quoted text here. Click to load it

Re: Jump to a page

Quoted text here. Click to load it

Many thanks Paul you go me on track.

For all you at home here's how I solved my problem.

In one html file have a form thus.

<form name="Goto" method="post" action="redir.php">
<input type="text" name="url">
<input type="submit" name="send" value="send">

In a file redir.php

Have just

    $url = "http://www.yourwebsite here.com/"+$_POST["url"];
    header("Location: $url"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */

Other usefull places to get help.

http://www.lampscripts.net /
and of course

Happy redirecting



Re: Jump to a page

Quoted text here. Click to load it

It's simple using PHP. If your form has GET or POST, and the input is called
"usr" you can do something like this:
if (isset($in_usr)) { header("Location: http://www.mypage.com /".$in_usr); }
else { header("Location: http://www.mypage.com /"); }


Kim André Akerø
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)

Site Timeline