 <p><strong>Here is the <em>answer</em> for those of you looking like I did all over the web trying to find out how to do this task. Uploading a photo to a server with the file name stored in a mysql database and other form data you want in your Database.</strong> Please let me know if it helped. </p> <p>Firstly the form you need: </p> <pre><code> &lt;form method="post" action="addMember.php" enctype="multipart/form-data"&gt; &lt;p&gt; Please Enter the Band Members Name. &lt;/p&gt; &lt;p&gt; Band Member or Affiliates Name: &lt;/p&gt; &lt;input type="text" name="nameMember"/&gt; &lt;p&gt; Please Enter the Band Members Position. Example:Drums. &lt;/p&gt; &lt;p&gt; Band Position: &lt;/p&gt; &lt;input type="text" name="bandMember"/&gt; &lt;p&gt; Please Upload a Photo of the Member in gif or jpeg format. The file name should be named after the Members name. If the same file name is uploaded twice it will be overwritten! Maxium size of File is 35kb. &lt;/p&gt; &lt;p&gt; Photo: &lt;/p&gt; &lt;input type="hidden" name="size" value="350000"&gt; &lt;input type="file" name="photo"&gt; &lt;p&gt; Please Enter any other information about the band member here. &lt;/p&gt; &lt;p&gt; Other Member Information: &lt;/p&gt; &lt;textarea rows="10" cols="35" name="aboutMember"&gt; &lt;/textarea&gt; &lt;p&gt; Please Enter any other Bands the Member has been in. &lt;/p&gt; &lt;p&gt; Other Bands: &lt;/p&gt; &lt;input type="text" name="otherBands" size=30 /&gt; &lt;br/&gt; &lt;br/&gt; &lt;input TYPE="submit" name="upload" title="Add data to the Database" value="Add Member"/&gt; &lt;/form&gt; </code></pre> <p>Then this code processes you data from the form: </p> <pre><code> &lt;?php // This is the directory where images will be saved $target = "your directory"; $target = $target . basename( $_FILES['photo']['name']); // This gets all the other information from the form $name=$_POST['nameMember']; $bandMember=$_POST['bandMember']; $pic=($_FILES['photo']['name']); $about=$_POST['aboutMember']; $bands=$_POST['otherBands']; // Connects to your Database mysqli_connect("yourhost", "username", "password") or die(mysqli_error()) ; mysqli_select_db("dbName") or die(mysqli_error()) ; // Writes the information to the database mysqli_query("INSERT INTO tableName (nameMember,bandMember,photo,aboutMember,otherBands) VALUES ('$name', '$bandMember', '$pic', '$about', '$bands')") ; // Writes the photo to the server if(move_uploaded_file($_FILES['photo']['tmp_name'], $target)) { // Tells you if its all ok echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"; } else { // Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?&gt; </code></pre> <p>Code edited from <a href="http://www.about.com" rel="nofollow noreferrer">www.about.com</a></p>