So let's say you are posting a new article, post, whatever... and want to upload an image. I have an images table that links to the article_id, but the article_id is not yet known since it hasn't been created it. This is obviously a non-issue on edit. Just wondering, is there a general way to go about handling this? I need to store a bunch of details about the image, which is fine - it's just the link to the article_id that is missing. Due to a foreign key constraint I can't really just assign it a (temporary) value of 0 or something, either...
Eh..the user wont know. Upload the image, and secretly add the article and then let the user submit which would update the earlier submitted fields?
Store the image in a temporary location and coocie its existance? then when you save you move it to a perminante location then once in a while wipe the temp files