Hello everyone, I am searching a good php coder or any who know how do this, I want make in my web site, Galery section, where players can upload him Pictures, but I am not good in php, can help me? or give me any idea?
//No credits go to me i got this from google :)
<?php
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if ($uploaded_size > 350000)
{
echo "Your file is too large.<br>";
$ok=0;
}
if ($uploaded_type =="text/php")
{
echo "No PHP files<br>";
$ok=0;
}
if (!($uploaded_type=="image/jpeg")) {
echo "You may only upload JPEG images.<br>";
$ok=0;
}
if ($ok==0)
{
Echo "Sorry your image was not uploaded";
}
else
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else
{
echo "Sorry, there was a problem uploading your image.";
}
}
?>
You might want to add a bit more to 'preview' the image w/o downloading
//No credits go to me i got this from google :)
<?php
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if ($uploaded_size > 350000)
{
echo "Your file is too large.<br>";
$ok=0;
}
if ($uploaded_type =="text/php")
{
echo "No PHP files<br>";
$ok=0;
}
if (!($uploaded_type=="image/jpeg")) {
echo "You may only upload JPEG images.<br>";
$ok=0;
}
if ($ok==0)
{
Echo "Sorry your image was not uploaded";
}
else
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else
{
echo "Sorry, there was a problem uploading your image.";
}
}
?>
You might want to add a bit more to 'preview' the image w/o downloading
Thanks bro, I like this, I go to ask a stupid question, xD, how to use this? where put this codec? I need make a new .php file with this and call this?
Erstelle eure WebSite / Create your Website 10/20/2010 - elite*gold Trading - 39 Replies Hallo Community,
Aktuelle Treasures
No permission - GEKAUFT
No permission - OFFEN
Da ich genügend Zeit habe, und neben nach neuen Herrausforderungen suche, bietet ich ab heute meinen Website Service an.
[Website] need free a website? look here. 11/10/2008 - CO2 Private Server - 9 Replies hey server owners im a pro with moonfruit (website creator) and yes i make websites for you guys for free because i like it to make them.
What you guys are thinking:
wtf, moonfruit is free for everyone why offering your service?
answer to you guys:
because i like to make website with moonfruit for people and i know everything about making website with moonfruit, moonfruit does have many secret options that not people know
[email protected] is my email you can add me anytime
Before-After Galery.... 04/30/2005 - General Art - 21 Replies Postet alles was Ihr so grafisch macht oder gemacht habt. Eigene Pics oder irgendwelche ausm I-Net, die Ihr dann "veredelt" habt. Wallpapers, Banner, Avatare oder einfach nur Pics...ich bin gespannt!^^