Jump to a page

R

Richard

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

e.g.

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

Richard
 
K

Kim André Akerø

Richard said:
I'm trying to find a simple way to jump to another page after a user input.

e.g.

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

Richard

It's simple using PHP. If your form has GET or POST, and the input is called
"usr" you can do something like this:
 
R

Richard

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

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">
</form>

In a file redir.php

Have just

<?php
$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. */
exit;
?>

Other usefull places to get help.

http://www.lampscripts.net/
http://www.webmasterworld.com/forum88/749.htm
http://forums.devarticles.com/archive/t-5907
and of course
http://www.php.net/manual/en/function.header.php

Happy redirecting

:)

R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top