close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

error in online store contact us form

Thread began 10/22/2010 12:02 pm by sandy170299 | Last modified 11/08/2010 9:08 am by Jason Byrnes | 782 views | 7 replies |

sandy170299

error in online store contact us form

When the form is submitted, I get this error:

Parse error: syntax error, unexpected ',' in /home/content/69/6124769/html/safetbar/store/WA_Universal_Email/Email_Templates/contactus.php on line 14


The URL is contactus.php

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of the WA_Universal_Email/Email_Templates/contactus.php file so I can examine the code at line 14 please

Sign in to reply to this post

sandy170299

<html>
<head>
</head>
<body style="font-family: Arial, Helvetica, sans-serif;">
<div id="content" style="font-size: 12px;">
<h1 style="color: #3476a3;font-size: 16px;font-weight: bold;margin:0;"><?php echo($WAGLOBAL_Site_Name); ?> Contact Form Response</h1>
<hr style="margin:0;"/>
<?php
foreach( $_POST as $pkey => $pval ){
if ($pval != "" && strpos($pkey,"Security_") !== 0 && $pkey != "x" && $pkey != "y") {
?>
<div style="formRow">
<strong><?php echo(str_replace("_"," ",$pkey)); ?>: </strong>
<?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval),$pval))); ?>
</div>
<?php
}
}
?>
</div>
</body>
</html>


Line 14: <?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval),$pval))); ?>

Sign in to reply to this post

Jason ByrnesWebAssist

change line 14 to:

php:
<?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))); ?>
Sign in to reply to this post

sandy170299

Thanks, Jason. Worked perfectly. Is this something I will need to change each time?

Sign in to reply to this post

Jason ByrnesWebAssist

I'm looking at a freshly downloaded copy of that file and the code is correct, I can say how yours got changed.

Sign in to reply to this post

beemerrider280362

Same parse error, only fix does not work

I'm having the same problem, but my code is already the same as what was mentioned to replace and was the correct code.

Parse error: syntax error, unexpected ',' in D:\Websites\wigs_will_travel\WA_Universal_Email\Email_Templates\contactus.php on line 14

THis is the code I have at line 14:

<?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))); ?>

contactus.php

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of the Email_Templates\contactus.php file in a zip archive so i can examine the code.

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...