line. parse error. "userfile_size>..."

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Thu Nov 14, 2002 5:46 am

As I see you so new in PHP.
You have few sintax error in your code

Code: Select all


// so if have a file we will save him, but we must test is this file a picture or not


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
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);
echo("<a href=$fd>link</a>");


In next time see carefully :wink:
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";

Post Reply