komquat Posted June 21, 2007 Share Posted June 21, 2007 Can I send a variable hidden in an email and get it back when they send it back? $mail_message = "<table align='center' border='10'> <tr> <td>$_POST[user_name], you signed up for ---------, Please click on the register here link below</td> </tr> <tr> <form name='send_email' method='POST' action='http://www.andybourdeau.com/lee/register.php'> <input type='hidden' name='register_check' value='yes'> <input type='hidden' name='user_name' value='$_POST[user_name]'> <input type='hidden' name='user_pass' value='$_POST[user_pass]'> <input type='hidden' name='user_email' value='$_POST[user_email]'> <input type='hidden' name='first_name' value='$_POST[first_name]'> <input type='hidden' name='last_name' value='$_POST[last_name]'> </form> </tr> <tr> <td><a href='http://www.andybourdeau.com/lee/register.php' onclick='javascript:document.send_email.submit();return false;'>Register</a></td> </tr> </table>"; //Mail message Set up here $mailmsg .= "<html> <title>Register</title> <body>"; $mailmsg .= "<p align='center'>$mail_message</p> \n"; $mailmsg .= "</body></html>"; $subject = "Register for Website"; $mailheaders = 'MIME-Version: 1.0' . "\r\n"; $mailheaders .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $mailheaders .= "From: webmater@andybourdeau.com"; mail($to, $subject, $mail_message, $mailheaders); I want to get the hidden variables back when I click the link in the email. Quote Link to comment https://forums.phpfreaks.com/topic/56484-sendingreceiving-variables-through-email/ Share on other sites More sharing options...
komquat Posted June 21, 2007 Author Share Posted June 21, 2007 any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/56484-sendingreceiving-variables-through-email/#findComment-279213 Share on other sites More sharing options...
ToonMariner Posted June 21, 2007 Share Posted June 21, 2007 you can put a html form in an email and set its action to a script that will accept the data. Quote Link to comment https://forums.phpfreaks.com/topic/56484-sendingreceiving-variables-through-email/#findComment-279216 Share on other sites More sharing options...
komquat Posted June 21, 2007 Author Share Posted June 21, 2007 if you take a look at the code in my first post, I did that, it does not pass the information back when you click on the link Quote Link to comment https://forums.phpfreaks.com/topic/56484-sendingreceiving-variables-through-email/#findComment-279300 Share on other sites More sharing options...
ToonMariner Posted June 21, 2007 Share Posted June 21, 2007 you should be using a submit button NOT a link. HTML support in email clients is patchy at best but they all understand the funjdamental html elements and what to do with them... Quote Link to comment https://forums.phpfreaks.com/topic/56484-sendingreceiving-variables-through-email/#findComment-279348 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.