Posted by J.O. Aho on 12/27/06 17:05
Joja wrote:
> Im uploading images to server db and each user can have just one picture.
> User can fill his data and choose his picture ( normal signup with image
> upload ).
>
> The problem is that im loading upload file in new window ( not in signup
> window ) so i can not control how many uploads are made.When the user clicks
> upload button, photo is saved in the db.
>
> How to block user to make multiple image uploads.?
You could have a column which is the userid and set it UNIQUE, before
inserting the image to the database, check if there is a such user, if not use
INSERT, if yes use UPDATE.
--
//Aho
[Back to original message]
|