$to = "hello@waystowasteless.com"; $from_header = "From: $from"; if($contents != "") { //send mail - $subject & $contents come from surfer input mail($to, $subject, $contents, $from_header); // redirect back to url visitor came from header("Location: $HTTP_REFERER"); } else { print("
Error, no comments were submitted!"); print(""); } ?>