# Help me edite contact.php!

**URL:** <https://forum.kirupa.com/t/help-me-edite-contact-php/311413>\
**Category:** Uncategorized\
**Created:** [July 6, 2010, 8:58am UTC](https://forum.kirupa.com/t/help-me-edite-contact-php/311413 "2010-07-06T08:58:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![reni2040](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@reni2040](https://forum.kirupa.com/u/reni2040)\
**Post date:** [July 6, 2010, 8:58am UTC](https://forum.kirupa.com/t/help-me-edite-contact-php/311413/1 "2010-07-06T08:58:55Z")

</div>

can anyone help me to edit this contact.php script ?..i dont know php scripting,so thats why… thnx in advance

```auto
<?php
//-----------------Getting data sent by flash---------------------
foreach ($_POST as $key => $value){

        if ($key != 'mail_to' && $key != 'smtp_server' && $key != 'smtp_port' && $key != 'mail_from' && $key != 'mail_subject' && $key != 'plain_text'){
    
            $mail_body .= '<b>'.str_replace('_',' ',$key).'</b>:<br/>';
    
            $mail_body .= ''.stripslashes($value).'<br/>';
        }
}
//-----------------------------------------------------------------

$message = '<html><body>'.$mail_body.'</body></html>'; // mail body

//------------if plain text is set to true removing html tags------
if ($_POST['plain_text']=='true') {

    $message = str_replace('<br/>',"
", $message);

    $message = strip_tags($message);

//------------------------------------------------------------------
} else {
//----otherwise composing message headers---------------------------
    $headers = 'MIME-Version: 1.0' . "
";
    
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
//------------------------------------------------------------------
}

//------------setting conf data-------------------------------------
$to = $_POST['mail_to'];

$from = $_POST['mail_from'];

$subject = $_POST['mail_subject'];

$smtp_server = $_POST['smtp_server'];

$smtp_port = $_POST['smtp_port'];
//------------------------------------------------------------------

//---------setting header info--------------------------------------
$headers .= 'To: '.$to. "
";

$headers .= 'From: Site visitor ' .$from. "
";
//------------------------------------------------------------------

if (mail($to, $subject, $message, $headers)){ // sending mail

    print('&mail=1'); //succes

} else {

    print('&mail=0');//failure

}

?>

```
