php mysql image name into database
I am working on a php file for school. We have to take a form and add first name, last name, email and a photo to a database. I am able to add the names, email to the database but am unable to add the image name to the database. Here is part of the php code and some of the html. If someone can please take a look and give some help. Many thanks in advance.
<?php // select the database in which to add a table
$sql ="INSERT INTO drivers_0115061 (ln,fn,month,day,year,photo,email)
//$sql="INSERT INTO people (fn,ln,dob,city,prov,pc,gender,hc,nod) VALUES ('steve','douglas',1234567,'winnipeg','manitoba','r3p 6g5','m','grey',2)";
<input type="hidden" name="MAX_FILE_SIZE" value="10000000"/>
<input type="file" id="photo" name="photo"/>
Start by looking at this "sticky" post at the top of this forum: http://www.webdeveloper.com/forum/sh...ages-using-PHP
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)