Hello, I am working on a site which is in a different language, and have added a form to a page called request when clicked submit it is processed by a page called contact.php and so when the user has clicked submit they should be redirected to a page called thankyou.html letting them know that their message is sent, i have edited the php form so when i click submit the form is sent and i am redirected to the thankyou.html viewing my message is ent however the php is not collecting all the information from the request page because when i view the email i just see the subject line, and couple of the information collected, so please let me know how this issue can be solved, thanks.
i think is the mail function structure. mail is structured like that : to, subject, message. After message you can put additional headers informations. so i think is better do like that ( this is a very quick and basic way ) :
if(isset($field1) && isset($field2)){ $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html;charset=utf-8' . "\r\n"; $headers .= "From:Your site name<mail address for example>"; $to= 'your email'; $subject= 'Email from etc...'; $message= "$field1 is the first field you type. $field2 is the second one."; if(@mail($to, $subject, $message,$headers)){ header("Location: thanks.html"); } else{ header("Location: error.html"); } }else{ echo 'complete the form.'; }
I am working on a site which is in a different language, and have added a form to a page called request when clicked submit it is processed by a page called contact.php and so when the user has clicked submit they should be redirected to a page called thankyou.html letting them know that their message is sent, i have edited the php form so when i click submit the form is sent and i am redirected to the thankyou.html viewing my message is ent however the php is not collecting all the information from the request page because when i view the email i just see the subject line, and couple of the information collected, so please let me know how this issue can be solved, thanks.
HTML, PHP,
mail is structured like that : to, subject, message.
After message you can put additional headers informations.
so i think is better do like that ( this is a very quick and basic way ) :
i hope this is correct and helps you! :)
bye