simple if error
Posted: Fri Aug 22, 2008 7:26 pm
So i have an email form. this is my code on the page
But if $submit is not set i get Notice: Undefined index: submit
Other than error_reporting(5) what cna i do to prevent this. Why can we not have empty variables?
Code: Select all
if ($_GET['submit']) {
$sendm = new sendmail();
$first_last = "anthony_james";
$sendm->query($first_last);
echo $sendm->email;
echo $sendm->query;
}
Other than error_reporting(5) what cna i do to prevent this. Why can we not have empty variables?