Upload Text & Image Script at the same time

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
raggy99
Forum Newbie
Posts: 13
Joined: Mon Aug 14, 2006 6:52 am

Upload Text & Image Script at the same time

Post by raggy99 »

I'm Looking for a tutorial. I did find one a while ago but now i can't find it.

the tutorial was a simple one where you upload text to a database and an image at the same time. The image stored in a folder called images and text into the database.

Can anyone direct me to where i could find a tutorial/code for this?

Many Thanks

Raggy
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Re: Upload Text & Image Script at the same time

Post by Skara »

http://php.net/manual/en/features.file-upload.php
PHP Manual wrote:

Code: Select all

<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="__URL__" method="POST">
    <!-- MAX_FILE_SIZE must precede the file input field -->
    <input type="hidden" name="MAX_FILE_SIZE" value="30000" />
    <!-- Name of input element determines name in $_FILES array -->
    Send this file: <input name="userfile" type="file" />
    <input type="submit" value="Send File" />
</form>
You can add other inputs within the same form.
Post Reply