A
Anonymous
Guest
Hi,
I am having a bit of a trouble writing a script to upload some datas and images...
Here is the problem..
I wanted to upload some informations such as ( Name, Address, Image ).
Two datas ( Name and Address ) will be stored in Mysql database called (people) , and Image will be stored in the directory called (people_pic) in the server.
The mysql table has 4 parts to it.
( id, name, address, image_name )
I have no clue on how to do the script on linking the mysql data and the specific image on server directory...
here is the uplaod form -----------------------------------
<form action="upload.php" method="post" enctype="multipart/form-data">
<table border="1" cellpadding="0" cellspacing="2" width="351">
<tr>
<td width="144">Name</td>
<td width="210"><input type="text" name="name" size="24"></td>
</tr>
<tr>
<td width="144">Address</td>
<td width="210"><input type="text" name="address" size="24"></td>
</tr>
<tr>
<td width="144">Image</td>
<td width="210"><input type="file" name="image" size="17"></td>
</tr>
<tr>
<td width="144"></td>
<td width="210"><input type="submit" value="Upload!"></td>
</tr>
</table>
</form>
-----------------------------------------------------------
I was successful on sotring text datas to the database, but not linking the actual image and data..
I am sorry, but I am a newbie....and still learning.... please help!
[/code]
I am having a bit of a trouble writing a script to upload some datas and images...
Here is the problem..
I wanted to upload some informations such as ( Name, Address, Image ).
Two datas ( Name and Address ) will be stored in Mysql database called (people) , and Image will be stored in the directory called (people_pic) in the server.
The mysql table has 4 parts to it.
( id, name, address, image_name )
I have no clue on how to do the script on linking the mysql data and the specific image on server directory...
here is the uplaod form -----------------------------------
<form action="upload.php" method="post" enctype="multipart/form-data">
<table border="1" cellpadding="0" cellspacing="2" width="351">
<tr>
<td width="144">Name</td>
<td width="210"><input type="text" name="name" size="24"></td>
</tr>
<tr>
<td width="144">Address</td>
<td width="210"><input type="text" name="address" size="24"></td>
</tr>
<tr>
<td width="144">Image</td>
<td width="210"><input type="file" name="image" size="17"></td>
</tr>
<tr>
<td width="144"></td>
<td width="210"><input type="submit" value="Upload!"></td>
</tr>
</table>
</form>
-----------------------------------------------------------
I was successful on sotring text datas to the database, but not linking the actual image and data..
I am sorry, but I am a newbie....and still learning.... please help!
[/code]