So, the way i did it was to first check to see fi the uploaded file was a jpeg, using getimagesize(). If it was, I'd add a row into the database with the user id of who uploaded it, and some other info. Then, after the row is made, i use mysql_insert_id to get the unique id of that row. Now, just change the name of the uploaded file to returned #.jpg
Originally posted by chaza
how do you do that?