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:karama@gmail.com?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> Quote Link to comment 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 Quote Link to comment 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.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.