Connecting to MySQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KIMBONDI
    New Member
    • Jul 2007
    • 1

    #1

    Connecting to MySQL

    I have created php application form that contain full name, address,fax,sch ools he/she learnd, email,city,two refferees,and detail where and when he/she born and submit to my database for registration but i have a problem how to connect my form and and my database written in mysql.
  • nathj
    Recognized Expert Contributor
    • May 2007
    • 937

    #2
    Originally posted by KIMBONDI
    I have created php application form that contain full name, address,fax,sch ools he/she learnd, email,city,two refferees,and detail where and when he/she born and submit to my database for registration but i have a problem how to connect my form and and my database written in mysql.
    Hi Kimbondi,

    Your form presumably has an action on it - a url of where to go after completion and a method of post.
    [CODE=html]
    <form id='registratio n' action='thankyo u.php' method='post'>
    [/CODE]

    If you write this page in php you can display a gernal thankyou style maeesage to the visitor explaining the next steps if there are any and you can use this page to read the data you posted from the form and write it to the database.

    I recommend you have a read over this atricle on data abstraction layers.
    This really helped me to get my head around it all.

    You can, on the thankyou page, define a variable as the insert command that is then passed to the relevant function in the data absrtraction layer.

    Have a try with this and let me know how you get on. I will keep an eye on this thread and try to help where ever possible.

    nathj
    Last edited by nathj; Jul 9 '07, 08:05 AM. Reason: typo correction

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Changed thread title to better describe the problem (did you know that threads whose titles contain phrases such as, 'please help' actually get FEWER responses?).

      Comment

      Working...