Jump to content

Mailto with thank you page


thetwig

Recommended Posts

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

really confusing... :P 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  :P

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..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.