close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UE4 Trouble Sending Email With PHP Conditional Complex Code

Thread began 7/26/2010 1:08 pm by dlovas275157 | Last modified 7/26/2010 6:28 pm by Jason Byrnes | 760 views | 3 replies |

dlovas275157

UE4 Trouble Sending Email With PHP Conditional Complex Code

I send a newsletter via UE4, but I am having an issue placing a php conditional around an image within my email body. If the image exist, it is supposed to show. But if it does not exist, it does not show. THis conditional is inside a repeat region that generally shows 10-25 items.

It seems that UE4 has a lot of bugs and trouble with anything more than simple code. Attached is my before and after code (before and after adding the conditional). I suspect it has to do with how UE4 breaks up the code into lines, and it is somehow effecting the php code for the conditional.

When attempting to send, it prompts:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\Inetpub\hunterbooks\webassist\email\waue_index_3.php on line 151

Could you have a look at my code and advise on fixing.

Thanks. D.

Attached Files
Archive.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the line of code it is erroring on is:

php:
$MailBody = $MailBody . "     <? } // $row_rsNewArrivals['imgFile'] <> \"\" ?>\r\n";




it looks to me like the problem is being caused by the way you are writing the php code blocks.

it looks like you wrote this code block as:
<? } // $row_rsNewArrivals['imgFile'] <> "" ?>


instead of:
<?php } // $row_rsNewArrivals['imgFile'] <> "" ?>



change line 151 to:

php:
} // $row_rsNewArrivals['imgFile'] <> ""
Sign in to reply to this post

dlovas275157

Jason,

Thanks for the quick response. That fixed it! I have been writing my conditional incorrectly it appears. My PHP is not the greatest.

Appreciate the help. D.

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome, glad to hear it is working.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...