Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3

Thread: php error

  1. #1
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times

    php error

    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

    PHP 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($body70);
        
    mail('info@prattsofcarlow.ie','contact form submission'$body);}


      include 
    'view/footer.php';
       
    ?>
    line 24 is the $body variable in the if statement

  2.  

  3. #2
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times
    i had email in twice but it didnt resolve

  4. #3
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times
    sorted again


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:14 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com