anyone can help my task in school, i confused that.. the image cant store to database.
<form action="doOrder.php" method="post" enctype="multipart/form-data">
Category : T-SHIRT
Choose Size
<label for="sizes"><span>
<input type="radio" name="sizes" value="S" checked="checked"/>S
<input type="radio" name="sizes" value="M" />M
<input type="radio" name="sizes" value="L" />L
<input type="radio" name="sizes" value="XL" />XL
</span>
</label>
Fabric Type
<select name="fabric">
<option value="Cotton Combed">Cotton Combed</option>
<option value="Cotton Carded">Cotton Carded</option>
<option value="Polyester / PE">Polyester / PE</option>
</select>
Total
<input type="number" name="total" min="1" max="100">
<input type="file" name="imageUpload" id="imageUpload">
<input value="Submit" type="submit" name="submit">
</form>
and this the doOrder.php
<?php
require_once("connect.php");
$nama_file = $_FILES['images']['name'];
$sizes = $_POST['sizes'];
$fabric = $_POST['fabric'];
$total = $_POST['total'];
move_uploaded_file($_FILES['images']['tmp_name'], "images/".$_FILES['images']['name']);
$simpan = mysql_query("INSERT INTO pesanan(category, sizes, fabric, total,images) VALUES('T-SHIRT','$sizes','$fabric','$total','$nama_file')");
echo "Your add has been submited....";
?>
the error is that
Notice: Undefined index: images on line 4 Notice: Undefined index: images in on line 9 Notice: Undefined index: images in on line 9
<input type="file"/>hasname="imageUpload", why are you referring to it in PHP as$_FILES['images']?