RE: [PHP-DB] Arrays from forms....
| From: | Gary E. Terry | Date: | Fri, 01 Dec 2006 04:38:31 +0000 |
| Subject: | RE: [PHP-DB] Arrays from forms.... | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42789@lists.php.net to get a copy of this message | ||
OK.. I am a moron.. Forgot that I had changed the name of the field in the
form, and got sidetracked and didn't change it in the
php... But, still not working correctly.
Here is the output: Array -- Array -- Array
from:
<?php
include "db.inc.back.php";
foreach ($_FILES["pictures"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
echo "$error_codes[$error]";
move_uploaded_file(
$_FILES["pictures"]["tmp_name"][$key],
"bikeimages/" .$_FILES["pictures"]["name"][$key]
) or die("Problems with upload");
${"image".($key+1)} = $_FILES['pictures']['name'];
}
}
$make = $_POST['make'];
$model = $_POST['model'];
$year = $_POST['year'];
$color = $_POST['color'];
$description = $_POST['description'];
//$image1 = $_POST['image1'];
//$image2 = $_POST['image2'];
//$image3 = $_POST['image3'];
$status = $_POST['status'];
echo "$image1 -- $image2 -- $image3";
/*
$query = "INSERT INTO
Attachment: [application/x-pkcs7-signature] smime.p7s
inventory (make, model,
year, color,
description, image1, image2, image3,
status)
VALUES ('$make', '$model', '$year', '$color',
'$description',
'$image1', '$image2', '$image3', '$status');";
$result = mysql_db_query("$db", $query) or displayErrorQuery ($query);
echo "<meta http-equiv='refresh'
content='0;URL=inventorylist.php'>";
exit;
*/
?>
Attachment: [application/x-pkcs7-signature] smime.p7s