Form Input Box with Redirect to URL -...
Greetings to All, New guy here looking for a little assistance.
Please visit my website (http://www.justvideod.net) and if you look in the top right corner you will see what I'm trying to do. I want to add a single input box with a submit button.
When a visitor enters a number in the input box, I want to append that number to my URL and redirect them to the appropriate page.
For example, www.justvideod.net/branded/497710. I want the visitor to be able to enter their tour MLS number (497710 in this example) and after pressing Submit be redirected to that page.
Any help or suggestions on how to do this is greatly appreciated!
Please visit my website (http://www.justvideod.net) and if you look in the top right corner you will see what I'm trying to do. I want to add a single input box with a submit button.
When a visitor enters a number in the input box, I want to append that number to my URL and redirect them to the appropriate page.
For example, www.justvideod.net/branded/497710. I want the visitor to be able to enter their tour MLS number (497710 in this example) and after pressing Submit be redirected to that page.
Any help or suggestions on how to do this is greatly appreciated!
There is a script called "Key Redirection" which allows you to do that:
http://www.hotscripts.com/listing/key-redirection/#
I think you could also do this pretty easily with a PHP script. Ask these guys:
http://www.phpfreaks.com/forums/
Chad Spillars
http://www.DisneySubmarines.com
http://www.hotscripts.com/listing/key-redirection/#
This script is a redirection program that uses a list of key / url pairs to redirect
users based on the "key" they enter into a form field. There is an administration area which allows you to add new key / url values and to edit or delete existing keys, as well as to view and delete the log file.
users based on the "key" they enter into a form field. There is an administration area which allows you to add new key / url values and to edit or delete existing keys, as well as to view and delete the log file.
I think you could also do this pretty easily with a PHP script. Ask these guys:
http://www.phpfreaks.com/forums/
Chad Spillars
http://www.DisneySubmarines.com
Chad Spillars
"Look I finally made myself a signature!"
"Look I finally made myself a signature!"
yep - easy with php...
send your form to a php page that reads the form settings and redirects to a page...
use the "post" method on your form
get the data on the php page with..
$page = $_POST['formfieldname'];
a few ifs to check the setting and set the page name
then a header() to the page you want...
send your form to a php page that reads the form settings and redirects to a page...
use the "post" method on your form
get the data on the php page with..
$page = $_POST['formfieldname'];
a few ifs to check the setting and set the page name
then a header() to the page you want...
Have fun
~ Fe Pixie ~
~ Fe Pixie ~
Thanks for the quick replies but I'm not that technical...I added some simple code to my page:
<form method='get' action='http://www.justvideod.net/branded/'>
<input type='hidden' name='' value=''>
<input type='text' name='id'>
<input type='submit'>
</form>
This almost works! LOL! But I can't get rid of the ?id=
The resulting url is www.justvideod.net/branded/?id=497710
and I just want www.justvideod.net/branded/497710
<form method='get' action='http://www.justvideod.net/branded/'>
<input type='hidden' name='' value=''>
<input type='text' name='id'>
<input type='submit'>
</form>
This almost works! LOL! But I can't get rid of the ?id=
The resulting url is www.justvideod.net/branded/?id=497710
and I just want www.justvideod.net/branded/497710
Yep - its in the URL because you're using a GET method instead of a POST to send the data along from the form to the next page...
Its then expecting the www.justvideod.net/branded/ page to pick up the info from the url and do something with it... You'll need a bit of php to do that!!
Its then expecting the www.justvideod.net/branded/ page to pick up the info from the url and do something with it... You'll need a bit of php to do that!!

Have fun
~ Fe Pixie ~
~ Fe Pixie ~
Thanks Fe, any help with the PhP? I went to phpfreaks.com but they haven't replied either....
hmm - you want me to write it for you?
try this....
the form
<form method='post' action='forwarder.php'>
<input type='text' name='id'>
<input type='submit'>
</form>
make a page called forwarder.php and put this in it
make sure there are no spare blank lines in that file or it wont go...
should be all you need
try this....
the form
<form method='post' action='forwarder.php'>
<input type='text' name='id'>
<input type='submit'>
</form>
make a page called forwarder.php and put this in it
<?php
$id = $_POST['id'];
header("Location: /branded/$id");
?>
$id = $_POST['id'];
header("Location: /branded/$id");
?>
make sure there are no spare blank lines in that file or it wont go...
should be all you need

Have fun
~ Fe Pixie ~
~ Fe Pixie ~
Fe, Thank you! Thank you! Thank you! That works like a Champ! I love it! But....there's always a but....
....I would like to open the new page in a new browser. Can I do that?

Not without a heap more messing about - the header() function dont have any setting for it so you'd have to mess about with javascript or something that can control the browser (php is server side not client side)...
The easiest thing to do would be to have a "open this page in a new window" button once you got there for the user to click if they wanted to...
The easiest thing to do would be to have a "open this page in a new window" button once you got there for the user to click if they wanted to...
Have fun
~ Fe Pixie ~
~ Fe Pixie ~
Daniel,
I posted a link to a free software called key redirection towards the beginning of this post. Why don't you see if that software would allow you specify the page to open in a new browser?
I posted a link to a free software called key redirection towards the beginning of this post. Why don't you see if that software would allow you specify the page to open in a new browser?
Chad Spillars
"Look I finally made myself a signature!"
"Look I finally made myself a signature!"
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.