Log in

View Full Version : Get data from another page



queerfm
01-11-2007, 03:49 PM
Hi i want to make a page that allows a user to type a number or a word like
cat
and it goes to http://www.yoursite.com/cat
or 1
and it goes to http://www.yoursite.com/1

It needs to be so that it can allow fullstops and numbers

Thanks

queerfm
01-12-2007, 06:32 AM
can any one help?

tech_support
01-12-2007, 06:38 AM
With PHP?

If it's HTML, then you just make up a directory and redirect.

djr33
01-12-2007, 07:09 AM
Javascript could be really easy...
<form onSubmit="window.location=window.location+this.page.value;">
<input type="text" id="page">
<input type="submit" value="go">
</form>

Using a PHP backup would be a good idea too.


The code is untested but I THIIIIINK it should work...

tech_support
01-12-2007, 07:11 AM
I think he said folder redirection.

djr33
01-12-2007, 07:16 AM
He said page that allows a user to type something then go there....


Note: numbers are allowed. What's a full stop? Period? that, I think, might work, but it's not expected in URLs. You can, however, convert with javascript, but I'm not sure how exactly. I believe it's str.replace(params).

tech_support
01-12-2007, 08:32 AM
Yeah, I don't know why I thought folder redircetion.
I seem to be losing it now.

Well, I think it's



<form onSubmit="window.location=this.elements['page'].value;">
<input type="text" id="page">
<input type="submit" value="go">
</form>

queerfm
01-12-2007, 09:15 AM
hi no i am looking for something it can be php. i want something like this

www.yoursite.com/payment(Price).html

and what ever number they but in it places it where (Price) is.