www.webdeveloper.com
Results 1 to 2 of 2

Thread: Tough Form Challenge for me...

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Posts
    22

    Tough Form Challenge for me...

    Hey Everyone!

    Thanks in advance for your help, but I need some help/advice here for my work-related problem that I'm still googling and trying to find examples, links would be appreciated.

    The Problem:
    The form has 2 text boxes along with empty text boxes for form data, and the database already has some data, but the user wants to use the same data in the form, for example, clientele data. The Client would enter a 6 digit code, then click on Retrieve, once the retrieve button is clicked, A Database connection is established and the record based on that 6 digit code is retrieve and the data is populated on the form, then the user can just click on send and the form is validated automatically on client then server side, once all validations has been passed, the form is emailed to us.

    Can anyone help with this or offer advice please? Thanks in advance!
    CasperGemini

  2. #2
    Join Date
    Apr 2008
    Location
    Mumbai, India
    Posts
    259
    Hello,

    I hope the 6 digit code is a unique code in your database table.

    Once user submits 6 digit code and click on retrieve you need to call a query that actually retrieves the records from the database like below:

    e.g., your code: 123456

    PHP Code:
    $code 123456;
    $query mysql_query("Select * from your_table where code='$code'");
    $result mysql_fetch_array($query); 
    Then in the form input fields call the respective field values. Since this form is in same page, you can use ajax submit so the page wont reload again.

    Hope this helps!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles