thetwig Posted February 2, 2011 Share Posted February 2, 2011 Hey guys, when I do a normal mailto button, it works fine, but I have to use a form if I want to display a thank you/your message has been received page..... right? So once I do this, the subject and the body doesnt appear the way I want it to... only the can anyone tell me what I'm doin wrong? <form action="mailto:[email protected]?Subject=Request%20for%20Action&body=Name:%0D%0AUnit:%0D%0APhone:%0D%0A%0D%0ARequest%20for%20Action:%0D%0A" onsubmit="actionTq.html"> <input type="submit" value="Request for Action" /><br /><br /> </form> Link to comment https://forums.phpfreaks.com/topic/226428-mailto-with-thank-you-page/ Share on other sites More sharing options...
robert_gsfame Posted February 2, 2011 Share Posted February 2, 2011 really confusing... why dont try this way..let say u use POST method <form action="actionTq.html" method="post"> <input name="email" type="hidden" value="<?php echo $email;?>"> ===> pass the value <input type="submit" value="Request for Action" /> </form> then when submit button is being clicked, then go to actionTq.html use $to=$_POST['email']; $subject="xxx"; $body="xxx"; $header="xxxx"; $header.="Content-type: text/html r\n"; $message="xxxxx"; if(mailto($to,$subject,$message,$header)) { echo "Alright, your message has been successfully sent"; } else { echo "Oops error occured!"; } okay hope that helps Link to comment https://forums.phpfreaks.com/topic/226428-mailto-with-thank-you-page/#findComment-1168713 Share on other sites More sharing options...
thetwig Posted February 3, 2011 Author Share Posted February 3, 2011 hey robert, thanks for the tips... but I'm really confused as to what you are doing.. is there any way i can avoid using php? but if php is the only way to do it, then can you explain the code, esp the actual emailing part.. "mailto($to...)" thnx agen... and sorry for the noobage.. Link to comment https://forums.phpfreaks.com/topic/226428-mailto-with-thank-you-page/#findComment-1169274 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.