Arrays from forms....

Arrays from forms....

am 30.11.2006 18:36:34 von Terry

------=_NextPart_000_0302_01C7147C.2B585D20
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

I have a problem. I have done this before, but can't find the files.

I am using the following function to upload files from a form.

foreach ($_FILES["pictures"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
echo "$error_codes[$error]";
move_uploaded_file(
$_FILES["pictures"]["tmp_name"][$key],
"images/" .$_FILES["pictures"]["name"][$key]
) or die("Problems with upload");
}
}

I also need to insert the filenames of the uploaded files into a database.

There are three fields in my db for these filenames, image1 image2 and
image3.

What would be the best way to get those filenames from the array into the
vars $image1 $image2 and $image3?

the first file in the array should be $image1 and so on.

Thanks in advance.



------=_NextPart_000_0302_01C7147C.2B585D20
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIII1DCCAlww
ggHFoAMCAQICEEIpbDrrcNO/DiHUMVP6Tb8wDQYJKoZIhvcNAQEEBQAwYjEL MAkGA1UEBhMCWkEx
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNV BAMTI1RoYXd0ZSBQ
ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDUxNzE3MzA1NVoX DTA3MDUxNzE3MzA1
NVowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqG SIb3DQEJARYTdGVy
cnlAcXVpY2tpbmV0Lm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA urTgaNTuHgNEFZD2
wB0HmhIsP86k5kB3fHAgoVhBzY7cB6thcyLLhT/Lvw0zu33I6SY02Hz4sR/L 7UzrFZy+tXv/sLHa
R3iM+pda/iX9PkXJ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c3VpbmcgQ0ECEEIpbDrr cNO/DiHUMVP6Tb8w
gYcGCyqGSIb3DQEJEAILMXigdjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMc VGhhd3RlIENvbnN1
bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZy ZWVtYWlsIElzc3Vp
bmcgQ0ECEEIpbDrrcNO/DiHUMVP6Tb8wDQYJKoZIhvcNAQEBBQAEgYAQfKBj vCygJ8lrjzkglL8M
ler80k4pihWIGfosVgKuKLW8o1xPsXkCnvidSF2RG86jXzV79GsOymgDTDG5 4KQiHjv1oaqOGyfs
yqWP7HS8sYSgK4vJJaN6kJ032ZuEm15BqyVvpZCaW+wl3/W7ZRiD+UWF8IpC A0X/yryZhAxD/QAA
AAAAAA==

------=_NextPart_000_0302_01C7147C.2B585D20--

Re: Arrays from forms....

am 01.12.2006 00:21:19 von Chris

Gary E. Terry wrote:
> I have a problem. I have done this before, but can't find the files.
>
> I am using the following function to upload files from a form.
>
> foreach ($_FILES["pictures"]["error"] as $key => $error) {
> if ($error == UPLOAD_ERR_OK) {
> echo "$error_codes[$error]";
> move_uploaded_file(
> $_FILES["pictures"]["tmp_name"][$key],
> "images/" .$_FILES["pictures"]["name"][$key]
> ) or die("Problems with upload");
> }
> }
>
> I also need to insert the filenames of the uploaded files into a database.
>
> There are three fields in my db for these filenames, image1 image2 and
> image3.
>
> What would be the best way to get those filenames from the array into the
> vars $image1 $image2 and $image3?

You want variable variables:

http://www.php.net/manual/en/language.variables.variable.php

for ($i = 1; $i < 5; $i++) {
${"image".$i} = "i is " . $i;
}
echo $image4 . "\n";
?>

i is 4


so after the or die:

${"image".$key} = $_FILES['pictures']['name'];

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Arrays from forms....

am 01.12.2006 04:09:34 von Chris

Gary E. Terry wrote:
> I don't know if we are on the same page here... Maybe we are and I am just
> an idiot.
>
> The fields in my db are image1 image2 and image3.
>
> There are only three fields in the form that is being passed to the
> php script. But, on the form they are named "pictures[]".
>
> Here is the full php I am using to process the form output:
>
> > 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} = $_FILES['pictures']['name'];
> }
> }
>
> $make = $_POST['make'];
> $model = $_POST['model'];
> $year = $_POST['year'];
> $color = $_POST['color'];
> $description = $_POST['description'];
> $status = $_POST['status'];
>
> $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 "";
> ?>
>
>
> $image1 $image2 and $image3 are not getting defined... Not real sure what's
> going on.

Always cc the list so others can learn or suggest things.

Are you uploading 3 images? Maybe define them first as well:

foreach ($_FILES .. ) {
${"image".$key} = "";

if ($error == ....


or do you mean the values are always empty?

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Arrays from forms....

am 01.12.2006 04:30:47 von Terry

------=_NextPart_000_0008_01C714CF.2E1592A0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Sorry about that, not CC'ing the list...

the values are not always empty, they should always have something in
them...

There should be 3 images uploading. But, I am sure just to make life
interesting,
there will be times when there could be as little as one uploaded.

-----Original Message-----
From: Chris [mailto:dmagick@gmail.com]
Sent: Thursday, November 30, 2006 10:10 PM
To: Gary E. Terry
Cc: PHP DB
Subject: Re: [PHP-DB] Arrays from forms....

Gary E. Terry wrote:
> I don't know if we are on the same page here... Maybe we are and I am just
> an idiot.
>
> The fields in my db are image1 image2 and image3.
>
> There are only three fields in the form that is being passed to the
> php script. But, on the form they are named "pictures[]".
>
> Here is the full php I am using to process the form output:
>
> > 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} = $_FILES['pictures']['name'];
> }
> }
>
> $make = $_POST['make'];
> $model = $_POST['model'];
> $year = $_POST['year'];
> $color = $_POST['color'];
> $description = $_POST['description'];
> $status = $_POST['status'];
>
> $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 "";
> ?>
>
>
> $image1 $image2 and $image3 are not getting defined... Not real sure
what's
> going on.

Always cc the list so others can learn or suggest things.

Are you uploading 3 images? Maybe define them first as well:

foreach ($_FILES .. ) {
${"image".$key} = "";

if ($error == ....


or do you mean the values are always empty?

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


------=_NextPart_000_0008_01C714CF.2E1592A0
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIII1DCCAlww
ggHFoAMCAQICEEIpbDrrcNO/DiHUMVP6Tb8wDQYJKoZIhvcNAQEEBQAwYjEL MAkGA1UEBhMCWkEx
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpI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EPFw0wNjEyMDEw
MzMwNDZaMCMGCSqGSIb3DQEJBDEWBBSSNoARz95xShaNaplPOEloX1PcpDBn BgkqhkiG9w0BCQ8x
WjBYMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIAgDANBggqhkiG9w0DAgIB QDAHBgUrDgMCBzAN
BggqhkiG9w0DAgIBKDAHBgUrDgMCGjAKBggqhkiG9w0CBTCBhQYJKwYBBAGC NxAEMXgwdjBiMQsw
CQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg THRkLjEsMCoGA1UE
AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECEEIpbDrr cNO/DiHUMVP6Tb8w
gYcGCyqGSIb3DQEJEAILMXigdjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMc VGhhd3RlIENvbnN1
bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZy ZWVtYWlsIElzc3Vp
bmcgQ0ECEEIpbDrrcNO/DiHUMVP6Tb8wDQYJKoZIhvcNAQEBBQAEgYAe1WHD jy/YFB4dc0n9fSsO
vSE+3WE9uYXeR9hHapr6P+o8qX9VR113P4+NX/2weZbeoai7JEk7Lpfi232M G6xgAAjIKCU2fIoH
YolKt1OdCwKeCCXOAJYGcCJ461jkNhC2tMEOLDnecLqi/dCNVt/mopplp2j+ lGRPbfvqF8e+GQAA
AAAAAA==

------=_NextPart_000_0008_01C714CF.2E1592A0--

Re: Arrays from forms....

am 01.12.2006 04:38:56 von Chris

Gary E. Terry wrote:
> Sorry about that, not CC'ing the list...
>
> the values are not always empty, they should always have something in
> them...
>
> There should be 3 images uploading. But, I am sure just to make life
> interesting,
> there will be times when there could be as little as one uploaded.

If you print them out what's in them?

echo $image1;
echo $image2;

I just realized that the $key probably starts at 0 instead of 1, so you
might need to check that and then possibly:

${"image".($key+1)} = $_FILES['pictures']['name'];

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Arrays from forms....

am 01.12.2006 04:50:59 von Terry

------=_NextPart_000_002D_01C714D2.00DD76B0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

If I print them, there's nothing. all three

Here is the same file, in test mode...

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} = $_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 "";
exit;
*/
?>

I get " -- -- " outputted.

-----Original Message-----
From: Chris [mailto:dmagick@gmail.com]
Sent: Thursday, November 30, 2006 10:39 PM
To: Gary E. Terry
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Arrays from forms....

Gary E. Terry wrote:
> Sorry about that, not CC'ing the list...
>
> the values are not always empty, they should always have something in
> them...
>
> There should be 3 images uploading. But, I am sure just to make life
> interesting,
> there will be times when there could be as little as one uploaded.

If you print them out what's in them?

echo $image1;
echo $image2;

I just realized that the $key probably starts at 0 instead of 1, so you
might need to check that and then possibly:

${"image".($key+1)} = $_FILES['pictures']['name'];

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


------=_NextPart_000_002D_01C714D2.00DD76B0
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIII1DCCAlww
ggHFoAMCAQICEEIpbDrrcNO/DiHUMVP6Tb8wDQYJKoZIhvcNAQEEBQAwYjEL MAkGA1UEBhMCWkEx
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNV BAMTI1RoYXd0ZSBQ
ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDUxNzE3MzA1NVoX DTA3MDUxNzE3MzA1
NVowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqG SIb3DQEJARYTdGVy
cnlAcXVpY2tpbmV0Lm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA urTgaNTuHgNEFZD2
wB0HmhIsP86k5kB3fHAgoVhBzY7cB6thcyLLhT/Lvw0zu33I6SY02Hz4sR/L 7UzrFZy+tXv/sLHa
R3iM+pda/iX9PkXJ/3dUY6Al9o7nHQAOISbXxbiEVxuAJYh4OM+Fz0GgMdnM L2ILh+Ay8NizR4u2
6/0CAwEAAaMwMC4wHgYDVR0RBBcwFYETdGVycnlAcXVpY2tpbmV0Lm5ldDAM BgNVHRMBAf8EAjAA
MA0GCSqGSIb3DQEBBAUAA4GBAILRbqjB4rxukqntEcuaTz/6mc1TCylYd5qJ CPVKPh1b9dPoN4IA
s7pUZzEwPbAOKjxz4kMm74WHKuqSvKZuA+EDLFd9cpozVOG1W13N5o9LylFN tZDh3QyGpBPhKOy5
lgFOT8mgLDiOIc8wietvc01q7O/+QGGBnMKUGWRlhEFFMIIDLTCCApagAwIB AgIBADANBgkqhkiG
9w0B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y4qsr08vd7Bakn07pdWH3makGcIQR6A42mZ qMhuGkX0G7v3MQAA
AAAAAA==

------=_NextPart_000_002D_01C714D2.00DD76B0--

Re: Arrays from forms....

am 01.12.2006 04:55:54 von Chris

Gary E. Terry wrote:
> If I print them, there's nothing. all three
>
> Here is the same file, in test mode...
>
> > 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} = $_FILES['pictures']['name'];
> }
> }

Hmm, looks ok.

If you:

print_r($_FILES["pictures"]);

and

print_r($_FILES["pictures"]['error']);

do you get stuff there ?

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Arrays from forms....

am 01.12.2006 05:02:40 von Terry

------=_NextPart_000_0043_01C714D3.A2608D00
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Nope... here is the output.

"-- -- Array ( [error] => )"

-----Original Message-----
From: Chris [mailto:dmagick@gmail.com]
Sent: Thursday, November 30, 2006 10:56 PM
To: Gary E. Terry
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Arrays from forms....

Gary E. Terry wrote:
> If I print them, there's nothing. all three
>
> Here is the same file, in test mode...
>
> > 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} = $_FILES['pictures']['name'];
> }
> }

Hmm, looks ok.

If you:

print_r($_FILES["pictures"]);

and

print_r($_FILES["pictures"]['error']);

do you get stuff there ?

--
Postgresql & php tutorials
http://www.designmagick.com/

------=_NextPart_000_0043_01C714D3.A2608D00
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIII1DCCAlww
ggHFoAMCAQICEEIpbDrrcNO/DiHUMVP6Tb8wDQYJKoZIhvcNAQEEBQAwYjEL MAkGA1UEBhMCWkEx
JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNV BAMTI1RoYXd0ZSBQ
ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDUxNzE3MzA1NVoX DTA3MDUxNzE3MzA1
NVowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqG SIb3DQEJARYTdGVy
cnlAcXVpY2tpbmV0Lm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA urTgaNTuHgNEFZD2
wB0HmhIsP86k5kB3fHAgoVhBzY7cB6thcyLLhT/Lvw0zu33I6SY02Hz4sR/L 7UzrFZy+tXv/sLHa
R3iM+pda/iX9PkXJ/3dUY6Al9o7nHQAOISbXxbiEVxuAJYh4OM+Fz0GgMdnM L2ILh+Ay8NizR4u2
6/0CAwEAAaMwMC4wHgYDVR0RBBcwFYETdGVycnlAcXVpY2tpbmV0Lm5ldDAM BgNVHRMBAf8EAjAA
MA0GCSqGSIb3DQEBBAUAA4GBAILRbqjB4rxukqntEcuaTz/6mc1TCylYd5qJ CPVKPh1b9dPoN4IA
s7pUZzEwPbAOKjxz4kMm74WHKuqSvKZuA+EDLFd9cpozVOG1W13N5o9LylFN tZDh3QyGpBPhKOy5
lgFOT8mgLDiOIc8wietvc01q7O/+QGGBnMKUGWRlhEFFMIIDLTCCApagAwIB AgIBADANBgkqhkiG
9w0BAQ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ll2Si4g+cyNSIrQU2NZfJwUubmW/KjRCdaHgDr4M0 p7Aw0zNU4T0b4gAA
AAAAAA==

------=_NextPart_000_0043_01C714D3.A2608D00--

Re: Arrays from forms....

am 01.12.2006 05:24:34 von Chris

Gary E. Terry wrote:
> Nope... here is the output.
>
> "-- -- Array ( [error] => )"

So files aren't being uploaded properly at all.

Does your form have:

enctype="multipart/form-data"

in the form header?

ie


.....

Are your picture fields files?

Upload file:

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Arrays from forms....

am 01.12.2006 05:38:31 von Terry

------=_NextPart_000_0074_01C714D8.A4CA20B0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

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:



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 "";
exit;
*/
?>

------=_NextPart_000_0074_01C714D8.A4CA20B0
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: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8.A4CA20B0--

Re: Arrays from forms....

am 01.12.2006 05:45:34 von Chris

Gary E. Terry wrote:
> 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

Oops this:

${"image".($key+1)} = $_FILES['pictures']['name'];

should be:

${"image".($key+1)} = $_FILES['pictures'][$key]['name'];


--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Arrays from forms....

am 01.12.2006 05:51:46 von Terry

------=_NextPart_000_00A4_01C714DA.7EB89300
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

I know you really meant :

${"image".($key+1)} = $_FILES['pictures']['name'][$key];


And it works!!!

Thanks oh so very much!

-----Original Message-----
From: Chris [mailto:dmagick@gmail.com]
Sent: Thursday, November 30, 2006 11:46 PM
To: Gary E. Terry
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Arrays from forms....

Gary E. Terry wrote:
> 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

Oops this:

${"image".($key+1)} = $_FILES['pictures']['name'];

should be:

${"image".($key+1)} = $_FILES['pictures'][$key]['name'];


--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


------=_NextPart_000_00A4_01C714DA.7EB89300
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIII1DCCAlww
ggHFoAMCAQICEEIpbDrrcNO/DiHUMVP6Tb8wDQYJKoZIhvcNAQEEBQAwYjEL MAkGA1UEBhMCWkEx
JTAjBgNVB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CwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJ BTEPFw0wNjEyMDEw
NDUxNDZaMCMGCSqGSIb3DQEJBDEWBBRbocvhmLCTVogT9nDaUBr4LSvoxTBn BgkqhkiG9w0BCQ8x
WjBYMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIAgDANBggqhkiG9w0DAgIB QDAHBgUrDgMCBzAN
BggqhkiG9w0DAgIBKDAHBgUrDgMCGjAKBggqhkiG9w0CBTCBhQYJKwYBBAGC NxAEMXgwdjBiMQsw
CQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg THRkLjEsMCoGA1UE
AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECEEIpbDrr cNO/DiHUMVP6Tb8w
gYcGCyqGSIb3DQEJEAILMXigdjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMc VGhhd3RlIENvbnN1
bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZy ZWVtYWlsIElzc3Vp
bmcgQ0ECEEIpbDrrcNO/DiHUMVP6Tb8wDQYJKoZIhvcNAQEBBQAEgYAf+q/m /Q/vu8mapBnvcb8h
o+VO3qkrg/ad/4uFzkYGmqI4G6iHIGP+cjyIV11G2uGr+SJQyPPW3PhBWQF2 piIGj6A7ExbFhCGI
T4nfWYC+28JS7R8weWvlQxzZnUX1L5xq5B0y3LHze+sKtvhgSKOlTl/xKuFz nPesF8YBkorKNAAA
AAAAAA==

------=_NextPart_000_00A4_01C714DA.7EB89300--

Re: Arrays from forms....

am 01.12.2006 05:53:39 von Chris

Gary E. Terry wrote:
> I know you really meant :
>
> ${"image".($key+1)} = $_FILES['pictures']['name'][$key];

Oh yeh ;)

Glad we got there in the end! :)

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php