kerry62035 Posted October 24, 2007 Share Posted October 24, 2007 I used to attend college for computer programming. And I understand a decent chunk of what I'm doing, but here's where I'm going crazy. I have the following code below. I want to pass the variables set by a form to an HTML email that goes to a valid account. Here's what I've been trying to do: ---------------------------------------------------------------------------------------- <? //Variables that drop into the email body and elsewhere. $cust_name = $_REQUEST['name'] ; $cust_phone = $_REQUEST['phone'] ; $cust_email = $_REQUEST['email'] ; $cust_refd = $_REQUEST['refd_by'] ; $message = ' <body> <div align="left"> <p>A visitor to the site has submitted the form to listen to the 10-minute "FREE Membership Benefits" recording. </p> <p><strong>Prospect Profile: </strong></p> <table width="400" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="97">Name:</td> <td width="303" bgcolor="#CCCCCC">***** WHAT GOES HERE?!?!? *****</td> </tr> <tr> <td>Phone:</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td>Email:</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td>Referred by: </td> <td bgcolor="#CCCCCC"> </td> </tr> </table> <p><strong>Extra Information:</strong></p> <p>The message was sent on: </p> <p>Please consider contacting this customer to explore options in becoming a representative! </p> <p> </p> </div> </body> '; echo $message; ?> ---------------------------------------------------------------------------------------- Naturally, this doesn't work. And I remember from my C++ class that adding data from one variable to a string is possible... but I can't for the life of me remember how. Bottom line, H E L P!!! Quote Link to comment https://forums.phpfreaks.com/topic/74648-i-need-some-help-over-here/ Share on other sites More sharing options...
marcus Posted October 24, 2007 Share Posted October 24, 2007 echo 'hello my name is ' . $name; Quote Link to comment https://forums.phpfreaks.com/topic/74648-i-need-some-help-over-here/#findComment-377326 Share on other sites More sharing options...
atlanta Posted October 24, 2007 Share Posted October 24, 2007 im guessing im not understanding your question ... enough... could you elaborate ??... do you just wanna echo the data that is put into the form??<br>also you may want to filter those inputs for the form so you dont have any injection of code on your page Quote Link to comment https://forums.phpfreaks.com/topic/74648-i-need-some-help-over-here/#findComment-377342 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.