php - multiple values insert to mysql using last used id for multiple files -



php - multiple values insert to mysql using last used id for multiple files -

i'm making auto info form in admin panel. want add together 6 images have same id auto info

form auto info selectors (x12) file input (x6) /form

2 separate tables (cars , images)

how give file inputs same id auto info? i'm new programming, in mind have utilize max(id) auto table, add together +1 , give input files carid when inserting them database. there , easier way this? or logic faulty?

if using mysqli in php utilize mysqli_insert_id function

http://www.php.net//manual/en/mysqli.insert-id.php

this gives id of lastly record inserted.

you should never utilize max id. exclusively possible record has been inserted user / process between insert , next inserts of dependent records.

php mysql file user-input

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -