new upload script at rbj
July 7th, 2007I spend a good part of the afternoon re-doing the upload script at Rice Bowl Journals.
I would always just set it aside for another day. Until now…
So, I created another script totally from scratch, updated all the data structures, and just slowly put it all together piece by piece and debugging each line of code piece by piece as well.
The basic form:
<form enctype=”multipart/form-data” action=”http://ricebowljournals.com/index.php?action=19″ method=”POST”>
<input type=”hidden” name=”MAX_FILE_SIZE” value=”100000″ />
Choose a file to upload: <input name=”imagefile” type=”file” /><br />
<input type=”submit” value=”Upload File” name=”clicked” />
</form>
And, I think I finally created a custom-made upload script that is 100% workable with no bugs.
Well, if you’re an RBJ’er you’ll just have to try it for yourself and see if it uploads properly.
The basic upload snippet:
if ($_FILES['imagefile']['type'] == “image/gif) {
copy ($_FILES['imagefile']['tmp_name'], $destination.$_FILES['imagefile']['name'])
or die (”Could not upload the photo!”);}
The supported image formats are: JPEG, GIF and PNG
And I hope that is the end of all the image upload problems members have been having.
*crosses fingers and knocks on wood*

