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
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?
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?