Upload scripts and questions

danbnpp

New Member
Hey guys

Ok so I've been trying to figure out how to get uploads working on my site but the scripts I found don't help with what I need. I found simple scripts but I want the content to be posted to a page for visiters to see it. So far I have the simple one working here http://www.nimbusplanetproductions.com/photos/
and the code of the script I'm using is
Code:
<?php
 $allowedExts = array("jpg", "jpeg", "JPG", "gif", "png", "bmp");
 $extension = end(explode(".", $_FILES["file"]["name"]));
 if ((($_FILES["file"]["type"] == "image/gif")
 || ($_FILES["file"]["type"] == "image/jpeg")
 || ($_FILES["file"]["type"] == "image/JPG")
 || ($_FILES["file"]["type"] == "image/bmp")
 || ($_FILES["file"]["type"] == "image/pjpeg"))
 && ($_FILES["file"]["size"] < 250000)
 && in_array($extension, $allowedExts))
   {
   if ($_FILES["file"]["error"] > 0)
     {
     echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
     }
   else
     {
     echo "Upload: " . $_FILES["file"]["name"] . "<br />";
     echo "Type: " . $_FILES["file"]["type"] . "<br />";
     echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
     echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
 
    if (file_exists("uploads/" . $_FILES["file"]["name"]))
       {
       echo $_FILES["file"]["name"] . " already exists. ";
       }
     else
       {
       move_uploaded_file($_FILES["file"]["tmp_name"],
       "uploads/" . $_FILES["file"]["name"]);
       echo "Stored in: " . "uploads/" . $_FILES["file"]["name"];
       }
     }
   }
 else
   {
   echo "Invalid file";
   }
 ?>

So what I need to do now is post it in a web page to be viewed by all visitors but I want it posted a certin way cause I'm using light box for the photos and a player for videos, how can I go about doing this? And is it possible to have it put up on a page a certin way like where I want it and how I want it like in a table of a page?
 

danbnpp

New Member
I won't do that cause of cost issues, I'm a broke joke. Trying to get what I want is almost impossible because no one can lead me in the right direction, I guess I'll have to do some reading on php scripts and programing, are there any usefull books you can recomend?
 

chrishirst

Well-Known Member
Staff member
because no one can lead me in the right direction
Quite probably that is because,
put up on a page a certin way like where I want it and how I want it like in a table of a page?
Is FAR too vague to offer any advice or suggestions on where to even begin.
 

danbnpp

New Member
Ok what I want is to have say pictures to be posted to a page with reference to lightbox kinda like face book does and I want it to arrange them in rows and be able to keep them orginized to. I want the same for videos too if I can, I know it can be done but I haven't found anything that will do it just yet or info on how to do it and I won't pay for something I know I can do my self and I'm a broke joke so I have to make it myself.
 
Top