Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

php insert new records into multiple table

Guest
Jul 01, 2011 Jul 01, 2011

I have site that i want to use one user name and one password for each member for all of categoreis. I have regisration forms that i want to insert into new records into the two different tables at the same time with out using id.

for sample that i have one video profile and one dating profile both are using in one regisgration forms and want to send profiles into the two different tables with out using unit Id to pass out to other table.

is there is possible to create multiple insert recoreds from one registration forms!

if so, how can i do that!

please help thanks.

AM

TOPICS
Server side applications
906
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 01, 2011 Jul 01, 2011

Probably the easist way is to create multiple inserts.

$ins1 = "INSERT INTO tablename (columnname)  VALUES ('$yourvalue')";

$ins2 = "INSERT INTO tablename2 (columnname)  VALUES ('$yourvalue')";

Etc...

Do a search for mulitple mysql inserts....they will fill in the blanks.

Gary

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 01, 2011 Jul 01, 2011

so if i want to use dreamweaver behavior extension to allow me to create insert, how can i do that to create TWO inserts into SAME PAGE!, i have treid that and got me errors.

any idea!

AM

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 01, 2011 Jul 01, 2011

We would need to see your code to deteremine why you are getting errors..


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 01, 2011 Jul 01, 2011
LATEST

It would also be useful to see the database table design. I would also want to know why you need to insert duplicate data into two tables. There's usually a better way.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines