Jump to content

Recommended Posts

I am experimenting with some code. I have an html form that asks for first, last and company name also for home, cell and company phone numbers. I have been trying to insert the values into both tables with one insert query. Something I read online but it doesn't seem to work. If I use one insert query to insert into one table, then it works fine So if I want to insert the values from my form into two tables, do I need to use two insert queries? How is this normally done

Link to comment
https://forums.phpfreaks.com/topic/221688-inserting-into-two-tables/
Share on other sites

I don't know what you mean when you say the same data in two separate tables. I have

 

table names

firs name

last name

company name

 

table phone

home

cell

company phone

 

my form asks for the information above then I want to insert it. I am having trouble using just one insert query to insert whatever values were filled into the form. Someone else here said that you can't use one query to insert into to tables but I am finding code online for it.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.