Greetings:
I sometimes use a PHP-based online form generator called PHPForm. The form passes the data off to a file called process.php, which, depending on what you specify when you're designing the form on the front end, can e-mail the results of the form input.
In the e-mail section of process.php in one of my forms, there is the following:
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="userid: ".$userid."
realname: ".$realname."
gamertag: ".$gamertag."
birthdate: ".$birthdate."
location: ".$location."
education: ".$education."
occupation: ".$occupation."
familyinfo: ".$familyinfo."
favemovies: ".$favemovies."
favebooks: ".$favebooks."
favefoods: ".$favefoods."
favemusic: ".$favemusic."
otherfaves: ".$otherfaves."
consoleownedplanned: ".$consoleownedplanned."
timesarrested: ".$timesarrested."
hobbies: ".$hobbies."
mostfamousmet: ".$mostfamousmet."
somethingnotknown: ".$somethingnotknown."
motto: ".$motto."
favequote: ".$favequote."
linkpic1: ".$linkpic1."
linkpic2: ".$linkpic2."
linkpic3: ".$linkpic3."
";
This is the information that gets e-mailed to me when someone submits a form.
From this information, I manually generate a web page by pasting the values of the variables into an HTML template I have. Because this is tedious, I wanted to replace what's above with this:
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="<TABLE id=table1 width="100%" border=1>
<TBODY>
<TR>
<TD bgColor=#2b3b74 colSpan=3 height=53><strong><FONT face=Verdana color=#ffffff size=6>VGR MEMBER: ".$userid." </FONT></strong></TD></TR>
<TR>
<TD width=302 bgColor=#2b3b74><strong><FONT face=Verdana color=#ffffff>GAMERTAG: ".$gamertag." </FONT></strong></TD>
<TD bgColor=#2b3b74 colSpan=2><strong><FONT face=Verdana color=#ffffff>MEMBER BIO</FONT></strong></TD></TR>
<TR>
<TD width=302 rowSpan=5><FONT face=Verdana><A href="http://profile.mygamercard.net/".$gamertag.""><IMG src="http://card.mygamercard.net/".$gamertag.".png" border=0> </A></FONT></TD><FONT face=Verdana>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Real name:</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$realname."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Birthday</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$birthdate."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Location</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$location."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Education</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$education."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Occupation</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$occupation."</FONT></TD></TR>
<TR>
<TD width=302 rowSpan=5>".$linkpic1."</TD>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Family info</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$familyinfo."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Favorite movies</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$favemovies."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Favorite books</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$favebooks."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Favorite foods</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$favefoods."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Favorite music/bands</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$favemusic."</FONT></TD></TR>
<TR>
<TD width=302 rowSpan=5>".$linkpic2."</TD>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Other favorites</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$otherfaves."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Consoles you own or plan to get</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$consoleownedplanned."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Times arrested</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$timesarrested."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Other Hobbies</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$hobbies." </FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Most famous person you've met</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$mostfamousmet."</FONT></TD></TR>
<TR>
<TD width=302 rowSpan=7>".$linkpic3."</TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">Something we might not know about you</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$somethingnotknown."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Your motto</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$motto."</FONT></TD></TR>
<TR>
<TD width=221><FONT face="Verdana, Arial, Helvetica, sans-serif">Favorite quote</FONT></TD>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif">".$favequote."</FONT></TD></TR>
<TR>
<TD colspan="2"> </TD>
</TR>
<TR>
<TD colspan="2"> </TD>
</TR>
</TBODY></TABLE>
";
In other words, I want process.php to e-mail me the raw html, with the values already plugged in, that I need to create the web page.
The problem is that I get a parse error:
"Parse error: syntax error, unexpected T_LNUMBER in /home/../../phpform/use/vgr/process.php on line 35" (I am disguising the exact URL)
Line 35 starts with this:
$message="<TABLE id=table1 width="100%" border=1>
I assume that my syntax is just incorrect and that I need to use something - an escape character, maybe? - to get the php file to just send me the LITERAL, RAW HTML that follows.
Can you help a n00b?
Thanks,
jb