Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Awesome. Thanks Chris.
But yes, one table (probably the form table) would have an auto-incrementing PK, which the other table would use.
The id from the from table is only generated once the record is created. The problem is the image data is also written at the same time so how would I write a query to generate the session from the form table and write it into the image table? Would I write it as part of the insert query?
You can use MYSQL_INSERT_ID
.
You can use MYSQL_INSERT_ID.
Hmm. Sounds promising. Will look into this.
Resolved it in a similar away. I’m almost finished. I have a script for editing stored form data and images. If I upload an image and save it the form alignment goes out of whack. I’ve played around with the css that I think is the issue but it doesn’t make a difference.
It’s live here :
http://mbmitservices.co.uk/TCG/edit.php
username & password = admin
php :
https://gist.github.com/gyprosetti/46002e29676a88c43000
css :
Solved. A check for duplicate image error was pushing the content down.