Results 1 to 8 of 8

Thread: Get data from another page

  1. #1
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Get data from another page

    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
    The web in one word.

  2. #2
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    can any one help?
    The web in one word.

  3. #3
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    With PHP?

    If it's HTML, then you just make up a directory and redirect.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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...
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    I think he said folder redirection.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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).
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Yeah, I don't know why I thought folder redircetion.
    I seem to be losing it now.

    Well, I think it's

    Code:
    <form onSubmit="window.location=this.elements['page'].value;">
    <input type="text" id="page">
    <input type="submit" value="go">
    </form>
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  8. #8
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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.
    The web in one word.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •