PHP 30
Sum By Guest on 24th March 2017 05:54:41 AM
  1.         $escaped_party_size=htmlspecialchars($_POST['party-size'], ENT_QUOTES, 'UTF-8');
  2.         $escaped_adults=htmlspecialchars((int)$_POST['adults'], ENT_QUOTES, 'UTF-8');
  3.         $escaped_children=htmlspecialchars((int)$_POST['children'], ENT_QUOTES, 'UTF-8');
  4.  
  5.         $party_size = (int)$escaped_party_size;
  6.         $adults_number = (int)$escaped_adults;
  7.         $children_number = (int)$escaped_children;
  8.         $result = "";
  9.  
  10.         if( $party_size == 1 )
  11.         {
  12.               $result =  ($adults_number * 40) + ($children_number * 30);
  13.            
  14.         }
  15.         else if(party_size == 2){
  16.        
  17.              $result = ($adults_number * 30) + ($children_number * 20);
  18.         }
  19.         else if(party_size == 3){
  20.        
  21.              $result = ($adults_number * 25) + ($children_number * 15);
  22.         }
  23. /// send mail
  24. .'Price :' .$result. "\r\n"
  25. ktl ktl ktl
  26.  
  27. sto email erxontai oles oi times , opos titlos , h hmeromhnia  ktl ektos ap oto price

Paste is for source code and general debugging text.

Login or Register to delete or keep track of your pastes.