TheRealL

Untitled

Aug 9th, 2011
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.35 KB | None | 0 0
  1. FINN:
  2.         if($formok){
  3. PLASSER UNDER:
  4.         $code = str_replace("<", "&lt;", $code);
  5.         $code = str_replace(">", "&gt;", $code);
  6.  
  7. -------------------------------------------------------------------------------------------
  8. Kildekoden din skal da bli slik:
  9. -------------------------------------------------------------------------------------------
  10.         if($formok){
  11.         $code = str_replace("<", "&lt;", $code);
  12.         $code = str_replace(">", "&gt;", $code);
  13.  
  14.                 $headers = "From: [email protected]" . "\r\n";
  15.                 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  16.                
  17.                 $emailbody = "<p>You have recieved a new snippet from your website.</p>
  18.                                          <p><strong>Name: </strong> {$name} </p>
  19.                                          <p><strong>Email Address: </strong> {$email} </p>
  20.                                          <p><strong>Snippet Name: </strong> {$snippetName} </p>
  21.                                          <p><strong>Code: </strong></p>
  22.                                          <p> {$code} </p>
  23.                                          <p>This code was sent from the IP Address: {$ipaddress} on {$date} at {$time}</p>";
  24.                
  25.                 mail("[email protected]","New Enquiry",$emailbody,$headers);
  26.                
  27.         }
Advertisement
Add Comment
Please, Sign In to add comment