Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.