html - Php Error On Client Server -
i have created form on php writes result on .txt file.
what happens on server working good, on server there next error:
warning: cannot modify header info - headers sent (output started @ /home1/alertme/public_html/mavala/form.php:43) in /home1/alertme/public_html/mavala/form.php on line 52
the code using is:
<?php if(isset($_post['submit'])) { $name = $_post['name']; $email = $_post['email']; $new_content = "\r\nnome: " . $name; $new_content .= "\r\nemail: " . $email; file_put_contents('emaillist.txt', $new_content, file_append); print_r(error_get_last()); header('location: thank-you.html'); //this line 52 exit(); } ?> the link of server error is: http://trendalert.me/mavala/form.php
after filling form , submit, php writes result on .txt file not show give thanks page: http://trendalert.me/mavala/thank-you.html
again, on side it´s working, on clients´server not.
<?php
is issue, sending white space sends headers.
make sure <?php first thing in php file
also on production server, them warnings should suppressed
php html forms
No comments:
Post a Comment