autofill data using php/mysql

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • miz_luvly@hotmail.com

    #1

    autofill data using php/mysql

    hi guyz

    I have searched google and had no luck. I am trying to create a form
    where user enter postcode and address box fills up automatically from
    the back-end db.

    can anyone guide me on how to do this. An example would be helpful or
    maybe few links to related tutorial.

    thanks in advance.

  • Jerry Stuckle

    #2
    Re: autofill data using php/mysql

    miz_luvly@hotma il.com wrote:[color=blue]
    > hi guyz
    >
    > I have searched google and had no luck. I am trying to create a form
    > where user enter postcode and address box fills up automatically from
    > the back-end db.
    >
    > can anyone guide me on how to do this. An example would be helpful or
    > maybe few links to related tutorial.
    >
    > thanks in advance.
    >[/color]

    Well, first of all PHP is server side - it doesn't know when the
    postcode box is filled in. So you'll need some javascript to detect that.

    When the user fills in the box you can submit the page back to itself,
    get the postcode and fill in the rest of the info.

    The biggest problem is figuring out when the box is completely filled
    in. If, for instance, you say it must be six characters long, great.
    It's something you can test on. But what happens if the user enters the
    last character incorrectly and wants to change it? Now the user has to
    wait for the page to be sent back.

    Alternatively, you can send the entire postcode/address info with the
    page and use javascript to sort it out. But this is likely to be quite
    a bit of data.

    In any case - if you want it done automatically, you'll need javascript
    also. Otherwise just have a "fill in the blanks" button which submits
    the page back to itself and sets the info as above.


    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    Working...