Re: [PHP] Passing Variables Into mail()????
Hello Chase, Wednesday, February 25, 2004, 5:26:14 AM, you wrote: C None of the variables that are displayed on the result page or C injected into the database are showing in the email that I receive C from the form. C $message = ' C html C body C pThe following information was added to the v5 tracking record:/p C pstrongSubmit Date: ? echo $submit_date; ?/strongbr C strongIP Address: ? echo $ip_address; ?br You shouldn't be echo'ing from inside a variable! Try this instead: $message = html body pThe following information was added to the v5 tracking record:/p pstrongSubmit Date: $submit_date/strongbr strongIP Address: $ip_addressbr ; etc.. you get the idea. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing Variables Into mail()????
That didn't seem to work Richard... Now this is what my resulting email looks like... Submit Date: $submit_date IP Address: $ip_address Dealer Number: $dealer_number Employee Name: $tester_name Module / Screen Name: $module_name Report: $report Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Chase, Wednesday, February 25, 2004, 5:26:14 AM, you wrote: C None of the variables that are displayed on the result page or C injected into the database are showing in the email that I receive C from the form. C $message = ' C html C body C pThe following information was added to the v5 tracking record:/p C pstrongSubmit Date: ? echo $submit_date; ?/strongbr C strongIP Address: ? echo $ip_address; ?br You shouldn't be echo'ing from inside a variable! Try this instead: $message = html body pThe following information was added to the v5 tracking record:/p pstrongSubmit Date: $submit_date/strongbr strongIP Address: $ip_addressbr ; etc.. you get the idea. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Passing Variables Into mail()????
Hello Chase, Wednesday, February 25, 2004, 12:41:27 PM, you wrote: C That didn't seem to work Richard... Now this is what my resulting email C looks like... C Submit Date: $submit_date Notice that I swapped the $message = ' for $message = (look at the quote marks). You're probably still using ', this won't allow variables inside it to be parsed. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing Variables Into mail()????
Problem solved, thanks Richard... ..You had my solution, but I don't know if it was entirely what you said... As it turns out, it makes a difference that my $message variable was enclosed only in single quotes, not double quotes... who knew? Chase [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] That didn't seem to work Richard... Now this is what my resulting email looks like... Submit Date: $submit_date IP Address: $ip_address Dealer Number: $dealer_number Employee Name: $tester_name Module / Screen Name: $module_name Report: $report Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Chase, Wednesday, February 25, 2004, 5:26:14 AM, you wrote: C None of the variables that are displayed on the result page or C injected into the database are showing in the email that I receive C from the form. C $message = ' C html C body C pThe following information was added to the v5 tracking record:/p C pstrongSubmit Date: ? echo $submit_date; ?/strongbr C strongIP Address: ? echo $ip_address; ?br You shouldn't be echo'ing from inside a variable! Try this instead: $message = html body pThe following information was added to the v5 tracking record:/p pstrongSubmit Date: $submit_date/strongbr strongIP Address: $ip_addressbr ; etc.. you get the idea. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Passing Variables Into mail()????
Hello Chase, Wednesday, February 25, 2004, 12:47:58 PM, you wrote: C ..You had my solution, but I don't know if it was entirely what you said... C As it turns out, it makes a difference that my $message variable was C enclosed only in single quotes, not double quotes... who knew? Yup it does indeed - see my reply to your previous message saying just this :) In my original reply to you I had swapped the single quote for a double for you, but it's easy to miss I guess. Glad you got it sorted. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing Variables Into mail()????
I am trying to create a page that will display the results of a form as they are being added into a database as well as forward that info via email to multiple recipients. I sucked code from the .CHM file available at PHP/NET, and it is working with one small issue... None of the variables that are displayed on the result page or injected into the database are showing in the email that I receive from the form. Any help would be awesome... Mail code follows: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- /* recipients */ $to = [EMAIL PROTECTED] . , ; $to .= [EMAIL PROTECTED]; /* subject */ $subject = ***V5 ERROR REPORT***; /* message */ $message = ' html body pThe following information was added to the v5 tracking record:/p pstrongSubmit Date: ? echo $submit_date; ?/strongbr strongIP Address: ? echo $ip_address; ?br Dealer Number: ? echo $dealer_number; ?br Employee Name: ? echo $tester_name; ?br Module / Screen Name: ? echo $module_name; ?br Report:br ? echo $report; ? /strong/p /body /html '; /* To send HTML mail, you can set the Content-type header. */ $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; /* additional headers */ $headers .= From: V5 ERROR REPORT [EMAIL PROTECTED]\r\n; /* and now mail it */ mail($to, $subject, $message, $headers); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php