I have this code for uploading images and would like to change it so that if there is no image uploaded it will place an url into the database (mysql) as the default image.
$upload=$HTTP_POST_FILES['upload'];
if($errors==1) echo $error;
else{
$image_part =date("h_i_s")."_".$HTTP_POST_FILES['upload']['name'];
$image_list[16] = $image_part;
copy($HTTP_POST_FILES['upload']['tmp_name'], "files/".$image_part);
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="body: ".$body."
name: ".$name."
upload: ".$where_form_is."files/".$image_list[16].",
Is it possible?