Jump to content

Forms in array Help


clanstyles

Recommended Posts

Well its up there but ive changed some things.. Sorry. I bump because i need this and the rules say I can every few hours if nobody responds.

 

                            				$i=1;
										while ($i < 3)
										{
											if ($_FILES['image'.$i]['type'] == "image/jpeg" || $_FILES['image'.$i]['type'] == "image/jpg"
												 || $_FILES['image'.$i]['type'] == "image/pjpeg" || $_FILES['image'.$i]['type'] == "image/gif"){
												$count++;
												$file_name = "";
												$file_name .= "temp.";
												$file_name .= str_replace(".jpg","",str_replace("/","",str_replace("image","",$_FILES['imagefile'.$i]['type'])));  //Replaces to lowercase only .jpg files
												$ext = ".jpg";
												$random_digit = rand(1, 999);
												//Lets make a new name
												$new_file_name=$random_digit.$us.$count.$ext;
												//Lets Path it
												$path[$count]= "uploadimages/".$new_file_name;

												if(copy($_FILES['imagefile'.$i]['tmp_name'], $path[$count])){
													echo "It Copied!!!<br/>";
												}
												else{
													echo "copy Failed<br/>";
												}

											}
											$i++;
										}

 

What I need though is for it to implode the images at the end. All the names I mean.

 

What I really need is somthing that allows others to upload images. Like up to 3. I have three fields allready setup. image1 image2 image3. I need it so they can submit, gifs, jpgs, jpegs, pngs ect.. what ever they require. Then it stores it with a random name lik 12312.gif to a dir uploadedimages/. implodes the name for each image with a | seperating it. Later i have an explode that puts the image sout ( have that all done. )

 

Thank You

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.