Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
amprog_03_ex1 [2017-09-01 14:54]
127.0.0.1 external edit
amprog_03_ex1 [2017-09-15 08:19]
Anders Mosshäll
Line 17: Line 17:
       } else{       } else{
         echo 'Du har skrivit detta inlägg: <br>' . nl2br($_POST['text']); //Funktionen nl2br byter ut newline markering till <br>         echo 'Du har skrivit detta inlägg: <br>' . nl2br($_POST['text']); //Funktionen nl2br byter ut newline markering till <br>
 +        
 +        // Fördjupning: skicka mail
 +        // Skicka mail:
 +        $mail_to = 'example@example.com';
 +        $subject = 'Du har fått inlägg';
 +        $message = $_POST['text'];
 +        
 +      
 +      
 +        mail($mail_to,$subject,$message);
 +        
       }       }
     } else{     } else{