This is probably a very easy question, but i am new to PHP and don't know a great deal.
i am trying to write PHP code to send an email with the results of a form. However when i submit the form the following notice appears
Notice: Undefined offset: 1 in ......\processform.php on line 60
The code around line 60 is as follows
//send the mail
mail ($to, $subject, $message, $headers);
} else {
//if errors have been made then alert user
echo "You have made the following errors";
for ($i = 0; $i <= count ($input_errors); $i++) {
echo $input_errors[$i] ."<br />";
}
}
?>
Line 60 is echo $input_errors[$i] ."<br />";
Any help in how to correct this would be much appreciated. Thanks.