Помогите пожалуйста, не могу изменить скрипт..(форма отправки на email)
Нужно изменить формы (пример)
Буду вам очень благодарен, кто поможет..
Скрипт )
CODE |
<meta http-equiv="content-type" content="text/html; charset=windows-1251"/> <?php include('kcaptcha/kcaptcha.php'); session_start(); function a($a) { return(htmlspecialchars($a)); } if(empty($_POST['test'])) { echo' <form method="POST"> MESSAGE:<br/> <textarea cols="50" rows="5" name="test"></textarea><br/> <img src="kcaptcha?'.session_name().'='.session_id().'"/><br/> <input type="text" size="25" name="keystring" id="keystring"/><br/> <input type="submit" name="selfCC" id="selfCC" value=" Отправить"/> </form> '; } else { if(isset($_SESSION['captcha_keystring'])&&$_SESSION['captcha_keystring']==(isset($_POST['keystring'])?$_POST['keystring']:'')) { $header='From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $mail=mail('komu@pochtu.otpravitj','subject',a($_POST['test']),$header); if($mail) { echo'ok'; } else { echo'error sending mail'; } } else { echo'wrong capthca'; unset($_SESSION['captcha_keystring']); } } ?> |
CODE |
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at Z:\home\test2.ru\www\index.php:2) in Z:\home\test2.ru\www\index.php on line 4 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at Z:\home\test2.ru\www\index.php:2) in Z:\home\test2.ru\www\index.php on line 4 MESSAGE: |