Hello,
I have an issue that I am hoping to get resolved. I have so far not found a way to handle this.
I have created a form...a template which contains XML. The template will be populated with the form information.
Form:
first name
last name
day phone
evening phone
email
comments
Email Template:
I did this much and haven't completed the form or the XML file but so far I couldn't get this much to work. I get an email that has the following error:
Parse error: syntax error, unexpected T_STRING in /home/shopn8/public_html/dev2/components/com_chronocontact/chronocontact.php(327) : eval()'d code on line 1
Any idea what I may be doing wrong? Can I not send XML files via this engine?
Thanks in advance for the help! π
I have an issue that I am hoping to get resolved. I have so far not found a way to handle this.
I have created a form...a template which contains XML. The template will be populated with the form information.
Form:
first name
last name
day phone
evening phone
comments
Email Template:
<?ADF VERSION "1.0"?>
<?XML VERSION β1.0β?>
<adf>
<prospect>
<requestdate>2000-03-30T15:30:20-08:00</requestdate>
<vehicle>
<year>1999</year>
<make>Chevrolet</make>
<model>Blazer</model>
</vehicle>
<customer>
<contact>
<name part="full">{firstname} {lastname}</name>
<phone>{dayphone}</phone>
</contact>
</customer>
<vendor>
<contact>
<name part="full">Acura of Bellevue</name>
</contact>
</vendor>
</prospect>
</adf>
I did this much and haven't completed the form or the XML file but so far I couldn't get this much to work. I get an email that has the following error:
Parse error: syntax error, unexpected T_STRING in /home/shopn8/public_html/dev2/components/com_chronocontact/chronocontact.php(327) : eval()'d code on line 1
Any idea what I may be doing wrong? Can I not send XML files via this engine?
Thanks in advance for the help! π
Hi PageMasterRWS,
I've no idea what the answer is . . . but the problem is that the <? . . .?> tags are being interpreted as <?php ?> tags by the php interpreter when it processes the template. I suspect that you need to wrap the xml in some way to hide it from the php interpreter. Maybe the HEREDOC syntax will do the trick???
Bob
I've no idea what the answer is . . . but the problem is that the <? . . .?> tags are being interpreted as <?php ?> tags by the php interpreter when it processes the template. I suspect that you need to wrap the xml in some way to hide it from the php interpreter. Maybe the HEREDOC syntax will do the trick???
<?php
echo <<<END
<?ADF VERSION "1.0"?>
<?XML VERSION β1.0β?>
. . .
</adf>
END;
?>
Bob
I tried it but now it won't even send the email. LOL!!!
Well...I'll play with it some more. If you think of something let me know.
Thanks for trying!π
Well...I'll play with it some more. If you think of something let me know.
Thanks for trying!π
Hi, try:
Max
<?php
echo '<?ADF VERSION "1.0"?>
<?XML VERSION β1.0β?>
<adf>
<prospect>
<requestdate>2000-03-30T15:30:20-08:00</requestdate>
<vehicle>
<year>1999</year>
<make>Chevrolet</make>
<model>Blazer</model>
</vehicle>
<customer>
<contact>
<name part="full">{firstname} {lastname}</name>
<phone>{dayphone}</phone>
</contact>
</customer>
<vendor>
<contact>
<name part="full">Acura of Bellevue</name>
</contact>
</vendor>
</prospect>
</adf>';
?>
Max
This topic is locked and no more replies can be posted.