Hi,

Please can someone tell me how to upload images to my database table images. I would like to be able to link to these images eventually from a link on my webpage.

I would need to be able to upload more than one image at a time.

I am currently using this code, but its not uploading to my database table, just a folder on the server:

<?php 
 $target = "uploaded_images/"; 
 $target = $target . basename( $_FILES['uploaded']['name']) ; 

 if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 
 { 
 echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; 
 } 
 else 
 { 
 echo "Sorry, there was a problem uploading your file."; 
 } 
 ?> 
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.