Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2004
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP beginner needs guidance on database and html integration

    I have looked through forums and tutorials and with the advice there I have managed to manipulate my MYSQL database.

    I have created HTML forms to add data and select data with PHP to handle the file processes.

    However I have not been able to find an example of how to do this in a single HTML, or PHP, file.

    At the moment what happens is that data, or a search request, is entered, the user presses the validate button, the variables are processed by the PHP file and that is it, single time, ie no loop back for more data entry.

    What I am trying to do goes something like this :-

    I have a large HTML form, as part of it I want to look up record(s) in a table, I want the user to be able to select a record, this will set various other fields that I will display on the form, eg address, post code, etc.

    The field variables are passed to a PHP formmailer when the validate button is pressed.

    At the moment I have this form working by using SELECT and OPTION to get the address details but need guidance on how to change this section into using a database.

    I am a person who learns by following examples, so if somebody can offer me guidance, ie be a mentor, and show me some examples then I should be able to both achieve my objective and more importantly learn how to do it for the next time.

    Thanks

  • #2
    New Coder
    Join Date
    Aug 2007
    Location
    Wagga, Australia
    Posts
    59
    Thanks
    0
    Thanked 1 Time in 1 Post
    i suggest at this stage learn a bit more about how php works, it is server-side based if you wanted to do anything like what your speaking about in one page is either submit the form to itself with php code that gets called when it is submited or use a browser-based script like javascript / ajax. I recommend atm learn more php and do the process over a couple of different pages and scripts before then learning javascript and ajax than redoing the project to do it all in one page.
    good luck
    ~usik


  •  

    Posting Permissions

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