Welcome Guest, Not a member yet? Register   Sign In
Attach multiple images to post - best practice
#1

[eluser]Oozooo[/eluser]
Hi there,

Got a little question.

What is the best way to allow users to upload and attach images to a blog post they are currently writing ?

My thoughts:

Code:
1). Ajax upload the images and append hidden input fields on upload complete to the blog post form.

2). On submit of the form:
loop through the hidden input fields and move the files from the tmp dir to
the destination dir and insert the data into the images2post table with the mysql_insert_id()

Is this a correct approach ? Any other thoughts appreciated..




Theme © iAndrew 2016 - Forum software by © MyBB