ich hab da ein kleines problem also irgendwie funz das nicht so ganz wies sollte .. glaub ich hab da nur ein kleines problem aber ich finds nicht ..

Code: Alles auswählen
$timestamp = time();
if($was=="doit") {
$size = $bild_size;
$name = $bild_name;
$maxbildgroesse=40000 ;
$maxbildbreit=100;
$maxbildhoch=100;
$bg=getimagesize($name);
if($bg[0]>$maxbildbreit or $bg[1]>$maxbildhoch)
{
if($bg[0]>$bg[1])
$maxsize=$maxbildbreit/$bg[0];
else
$maxsize=$maxbildhoch/$bg[1];
$bg[0]=$bg[0]*$maxsize;
$bg[1]=$bg[1]*$maxsize;
}
$jpg = ".jpg";
$type = $bild_type;
if(eregi("(jpg)$",$name)) {
if($size<80000 AND $size!=0) {
copy($bild,"users/$user$jpg");
echo "Das Bild wurde erfolgreich hochgeladen.<br>";
?>