i have this error and i dont know what to do with it
Notice: Undefined index: bumber in C:\wamp64\www\final\contactform.php on line 24
line 24 is the $body variable in the if statementPHP Code:
<?php
include 'view/header.php';
// this function strips out potentially dangerous info to prevent abuse of emailing
function spam_scrubber($value){
//create array with potentially damaging words
$bad_values = ['to:', 'cc:','bcc:','content-type','mime-version','multipart-mixed','content-transfer-encoding'];
//loop through array and check for the keywords
foreach($bad_values as $bad){
if(stripos($value, $bad) !== false) return '';
}
// its important to note that this will return only once upon reaching the first keyword, it will then jump out of the loop
return Trim($value);
}
//use array_map to call the scrubber function on each element in post array
$scrubbed = array_map('spam_scrubber', $_POST);
//use array_map to remove html js and php tags from the newly created $scrubbed array so there should be no need to sanitize data
$stripped = array_map('strip_tags', $scrubbed);
echo "{$stripped['name']}";
if (isset($stripped['name']) && isset($stripped['email']) && isset($stripped['number']) && isset($stripped['email']) && isset($stripped['subject']) && isset($stripped['info'])){
$body = "name: {$stripped['name']}\n\n Email:{$stripped['email']}\n\n number:{$stripped['bumber']}\n\n subject:{$stripped['subject']}\n\n info:{$stripped['info']}";
$body = wordwrap($body, 70);
mail('info@prattsofcarlow.ie','contact form submission', $body);}
include 'view/footer.php';
?>