Upload files

i came acrross a tutorial about getting files from my database and create a xml file from this data. That works fine. now i like to add data to my database my knowledge reaches that also…
But now i like to upload an image to a location on my server and when i upload this file it must automattically add the directory of the file to my database so the xml.php file can add it as a xml record and automatically add it in my flash site as an image.

for example all the images must be in the directory “images/” and this directory and filename must be added to the database.
Does everybody can follow me?

Is there someone who can help me true this problem so i can find a solution.

Kind regards Jos:rabbit:

First you want to create a html form that uploads an image.


<form enctype="multipart/form-data" action="upload.php" method="post">
        <p class="left_feature">Select image to be uploaded<br />
    <input type="file" name="upload" /></p>
    <input type="submit" name="submit" value="submit" />
    </form>

Then you want the php script to check for errors and then write the file name to a database using the INSERT sql statment.
Then you want to use the move_uploaded_file function to move the image from the temp folder to the folder you swf files reads from, have a look on google lets loads of scripts.