if ($edit == 'tru') { $v ='UPDATE $which SET'; $w =" WHERE ID = '$id'"; }else{ $v ='INSERT INTO $which SET'; $w = $nil; }