dosha25
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Цитата: dosha25 на будущее - вам сюда Perl, PHP: отправка формы на e-mail Цитата: но в поле сообщение пишет не указано у вас там может быть и пробел или перенос строки - вы же форму не показали. вместо Цитата: if (!empty ($mess)){ напишите if (trim($mess) != '') | Извините не увидел этот раздел. Когда меняю на if (trim($mess) != '') письма вообще не приходят и в логе пишет ошибку [13-Jan-2013 15:36:40] PHP Parse error: syntax error, unexpected '}' in /home/a10241/public_html/php/contact.php on line 35 Вот форма: <?xml version="1.0" encoding="utf-8"?> <data> <settings> <!-- Choose to use a CSS file, true/false --> <useCSS>true</useCSS> <!-- The CSS file if used --> <cssURL>css/contactstyle.css</cssURL> <!-- The graphic for the the submit button --> <submitButton>images/contact/submit.png</submitButton> <!-- The graphic for the submit button on mouse over --> <submitButtonOver>images/contact/submit_over.png</submitButtonOver> <!-- The graphic for the reset button --> <resetButton>images/contact/reset.png</resetButton> <!-- The graphic for the reset button on mouse over --> <resetButtonOver>images/contact/reset_over.png</resetButtonOver> <!-- The email to send the form to --> <emailTo>вася@mail.ru</emailTo> <!-- The email's subject --> <emailSubject>Website Email</emailSubject> <!-- The email greeting text --> <emailGreeting>New Website Email</emailGreeting> <!-- The contact php file --> <phpURL>php/contact.php</phpURL> <!-- The message to be displayed when the form is submitted succesfully --> <succesMessage><![CDATA[<!-- BEGIN -->Спасибо за ваше сообщение<!-- END -->]]></succesMessage> <!-- The contact details for the page, HTML/CSS supported --> <contactDetails><![CDATA[<!-- BEGIN --><p>Вася Пупкин<br /> ТЕЛЕФОН 1234567<br /> E-MAIL <a class="link" href="mailto:вася@mail.ru>вася@mail.ru</a></p><!-- END -->]]></contactDetails> </settings> <!-- Only 4 fields are supported. All 4 fields must be used. An email field MUST be used --> <form> <field type="name"> <text>ИМЯ</text> <required>true</required> <validationType>text</validationType> <errorMessage>УКАЖИТЕ СВОЁ ИМЯ</errorMessage> </field> <field type="email"> <text>E-MAIL</text> <required>true</required> <validationType>email</validationType> <errorMessage>УКАЖИТЕ E-MAIL</errorMessage> </field> <field type="phone"> <text>ТЕЛЕФОН</text> <required>false</required> <validationType>phone</validationType> <errorMessage>ВВЕДИТЕ НОМЕР ТЕЛЕФОНА</errorMessage> </field> <field type="message"> <text>СООБЩЕНИЕ</text> <required>true</required> <validationType>text</validationType> <errorMessage>НАПИШИТЕ СООБЩЕНИЕ</errorMessage> </field> </form> </data> |