QUOTE(mzminnie @ Oct 7 2009, 07:27 AM)

I understand that that you store just the filename and move image to a folder. But the image is not going in the folder. I tried to look up how to do it but it's still not working.
The events folder is in the same directory as the source files.
This is what I have:
move_uploaded_file($_FILES["flyer"]["tmp_name"],"/events/" . $_FILES["flyer"]["tmp_name"]);
Thanks
First thing to do is to change it to
CODE
$from = $_FILES['flyer']['tmp_name'];
$to = '/events/' . $_FILES['flyer']['tmp_name'];
echo "<br>Copy $from ==) $to \n";
move_uploaded_file($from, $to);
Then you can see what's happening.
Anyway, you seem to be copying the file to /events/something, so unless the top-level directory /events/ exists, it won't work. Perhaps you mean 'events/something'... ?
Incidentally, the manual explicitly says that if the file exists it will be overwritten, and since the filename is given by the user, this means if user1 uploads a useful file called penguin.jpg, it will be lost if user2 happens to upload a piece of junk called penguin.jpg. So I think you want to save the given title in the database, perhaps, but assign a new filename on the database key.