not working need help

hey all this code says i am and dont working what make ?

[code]

<?php if (isset($_POST['submit'])) { $tdir = "images/"; $url = $_FILES['file']['name']; include ("komarov/config.php"); $query = mysql_query ("SELECT MAX(id) FROM `users`"); $result = mysql_fetch_array ($query); $id = $result['MAX(id)']; $name = $id.$_FILES['file']['name']; $file = "images/".$name; copy ($_FILES['file']['tmp_name'], "images/".$id.$_FILES['file']['name']);

list($width, $height) = getimagesize($file);
$sizex = 500;
$sizey = 500;

$dimg = imagecreate($sizex, $sizey);
$image = imagecreatetruecolor($width, $height);
$image2 = imagecreatefromjpeg($file);
imagecopyresampled($image, $image2, 0, 0, 0, 0, $sizex, $sizey, $width, $height);
imagejpeg($dimg, $tdir . $url, 75);

}
?>
[/code]

We’re not a ‘we’ll fix your script’ forum. Do some troubleshooting first and pinpoint where the problem might be. See the link in my signature for example.

Sponsor our Newsletter | Privacy Policy | Terms of Service