Jump to content

Saving combined php/mysql form back to another mysql table


factory fred

Recommended Posts

Hi

I'm learning PHP/Mysql. As an excercise I have created 2 tables. The first table contains a list of Countries, the second table is user information (Name, date of birth, email address) etc.

 

I have made a form into which the name, DOB, email address, is placed and I can save to the database (although its not checked for validity) succesfully ....no problem so far.

The country table can also be accessed via a php script (Countries.php) which displays correctly, again, ok so far.

 

What I would like to happen is that in my user information form, the appropriate country is selected from the countries table, then the form saves the whole lot into the user table populating the users 'country' field.

 

I used include "countrylist.php"; to get the list  into the same form as the users form but how do i now select that data to save to the users table.  Any help appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.