A
Anonymous
Guest
Hi!
As I see you so new in PHP.
You have few sintax error in your code
In next time see carefully :wink:
As I see you so new in PHP.
You have few sintax error in your code
Code:
<?
// so if have a file we will save him, but we must test is this file a picture or not
$userfile_name=$HTTP_POST_FILES['picture']['name'];
$userfile_size=$HTTP_POST_FILES['picture']['size'];
$userfile_type=$HTTP_POST_FILES['picture']['type'];
if ($userfile_size > 524288000) { echo ("This file to big for saving at our server. Sorry!"); }
if ($userfile_type == "image/gif" or $userfile_type == "image/jpeg" or $userfile_type == "image/png")
{
// In this case file is image and we are go to the dir where are pictures situated
// create a dir
$destination="upload/$username/";
mkdir ($destination, 0700); // I hope you want save pic into the $user - directory ...
$fd =$destination;
$fd .=$$userfile_name;
if (file_exists($fd))
{
move_uploaded_file ($userfile_name, $destination);
copy($userfile_name);
echo("<a href=http://www.fruir.org/fileform/simple_hotmail/showpic.php?link=$fd>link</a>");
}
}
In next time see carefully :wink: