Jump to content

WHats wrong with this?


jbegreen

Recommended Posts

Hey Guys,

 

I have an Array Count On file uploads (Upto 5 Files) Called Upload[0];

 

Is this right to use an individual filename from the array as a variable?

 

$image_upload1 = $_POST['upload'[0];

 

As i want to use is in this...

 

$insert_upload1 = "user_images/$username_entry/$image_upload1";

 

As $insert_upload1 is the variable for an INSERT value on my Database.

 

I think its something in the display of the 'upload[ ]  array.

 

Can anyone shed any light :)

 

 

Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/278636-whats-wrong-with-this/
Share on other sites

$image_upload1 = $_POST['upload'[0];

Do you see a problem there? Or is this not your actual code, and you added a typo?

 

One of the first things to learn is how to debug your code. You can do this here by printing the value of the $_POST array with

var_dump($_POST);

Does it display what you expect?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.