RE: Arrays from forms....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 `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: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux