/ Published in: PHP
                    
                                        
The right way to send a mail with POST params
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
mail($to, strip_tags( $_POST['subject'] ), stripslashes( utf8_decode( strip_tags( $_POST['message'] ) ) ), 'From: '.strip_tags( $_POST['name'] ).'<'.$_POST['email'].'>' );
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                