i cant find the problem


hello guys
i cant find the problem on that code.
there’s a form called edit.php that inclludes the form inputs and file input
and i want to if i dont want to add picture (from file input) php only update the other variables if i add pic, php update all


if ($POST[‘userfile’] != “none”);
$uploadedfile = $FILES[‘userfile’][‘tmp_name’];
$src = imagecreatefromjpeg($uploadedfile);
$tmp = imagecreatetruecolor($newwidth,$newheight);
$resim_id = strtolower(substr(ereg_replace(’: ', '
’, $album),0,20));
$resim_id2 = ereg_replace(’ ', '
’, $resim_id);
$tarih = date(“His”);
$image = $resim_id2.".jpg";
$strSQL = "UPDATE album_arsiv SET artist=’$artist’, album=’$album’, genre=’$genre’, image=’$image’ ";
$strSQL .= “WHERE id=$id”;
$sonuc = mysql_db_query($cfgdbisim,$strSQL);
header (“Location: krmd_goster.php?baslangic=$baslangic”);
$strSQL = “UPDATE album_arsiv SET artist=’$artist’, album=’$album’, genre=’$genre’”;
$strSQL .= “WHERE id=$id”;
$sonuc = mysql_db_query($cfgdbisim,$strSQL);
header (“Location: krmd_goster.php?baslangic=$baslangic”);


when i run update.php
Parse error: parse error in C:***update.php on line 30

  1. line is “else”
    but before it gave me no erros but also its tried to add pic. (but i didint add a pic)

sorry for my english i hope you can understand


The error is accurate. No ‘else’ is expected there as you have a semi-colon after your if statement.

if ($_POST['userfile'] != "none"); {


how can i make this script like what i told above
i cant solve im stuck! :-?

if theres nothing in $userfile just update other variables
if theres update all