Thanks for any help in advance , i am new to this stuff. All i am trying to do is upload an image (stored in folder) ,image_name name ,description ,price to the database. As i say i am new, i was wondering if anyone can tell me whether this code should be working. Ths images get to the folder fine as far as uploading those goes, but nothing seems to be getting to my db...is this because i have an <form action="up_go.php"> as well as a if(isset($submit)) at the bottom of the page?....
<head><title></title>
</head>
<body>
<form enctype="multipart/form-data" method="post" action="up_go.php">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000">
<b>Name</b><br>
<input type="Text" name="name" size="25">
<br>
<b>Description</b><br>
<input type="Text" name="description" size="25">
<br>
<b>Price</b><br>
<input type="Text" name="price" size="25">
<br>
<td><b>Image upload</b><br></td>
<td></td>
</tr>
<tr>
<td><input type="File" name="userfile" size="30" maxlength="255"><br>
</td>
</tr>
<tr>
<td><b>target filename: </b><br></td>
<td><input type="Text" name="image_name" size="30" maxlength="255"><br>
</td>
</tr>
<tr>
<tr>
<td><b>upload diretory: </b><br></td>
<td>c:\program files\apache group\realdocs\files\antiquesbasic\images</td>
</tr>
<td colspan="2" align="CENTER">
<INPUT TYPE="submit" VALUE="upload">
</td>
</tr>
</FORM>
<?php
if (isset($submit)) {
$db = mysql_connect("localhost","root");
mysql_select_db("antiques",$db);
$sql = "INSERT INTO general (name,description,price,image_name) ".
"VALUES ('$name,$description,$price,$image_name')";
}
?>
</body>