AnsweredAssumed Answered

Passing email addresses to a PHP script on the server side.

Question asked by ErichWetzel on Jan 14, 2010
Latest reply on Jan 17, 2010 by ErichWetzel


Passing email addresses to a PHP script on the server side.

Your post

We are using Mac OSX 10.5.x Server for web and email, FMSA 10, XSLT web page which calls a PHP script which composes an email from data passed by the XSLT page and sends the email via our own SMTP server.


We have a dynamic XSLT generated web page which includes the contents, though hidden but accessible in the source code, of an email address field.  The page allows the user to fill in fields and send a message.  The Form on the page calls a PHP script with the contents of the visible form fields along with the hidden data from FMSA including the email address of the receiver of the message.


I am looking for advice on how to go about keeping the contents of the email field strictly private on the server side and not at all in the source code of the page.  If the address appears in the page code it could be grabbed for spam or other purposes.


My thought was to try to send the PHP script the recordID and have the script call for the email address data directly from the FMS using the recordID.  My problem is that I am not sure how to go about doing that.  I imagine it would be only a couple of lines of code, I just don't know where to begin specifically.


If my idea above would work, does anyone know quickly what the code is to add inline in XSLT the recordID similar to this line from the XSLT page : 

<input name="infemail" type="hidden" value="{.}"/>

which puts the email address hidden into the form submitted to the PHP script? where {.} refers to :

<xsl:for-each select="fmrs:resultset/fmrs:record/fmrs:field[@name='Web Inf email']/fmrs:data">


If I can get the recordID over to the PHP script similar to the email address being passed as a variable above and add inline in PHP the contents of a specific field based on a recordID?  So in the PHP script the mail command lists inline as :

mail($mailto, $subject, $messageproper,...


I want to set $mailto = the code required for PHP to ask FMS directly for the contents of the email field based on the recordID sent from the above step.


My guess is that would be the method to use but I am not sure.




Thanks - Erich