syntax error in form redirect, desperate

June 9, 2009 at 01:11:10
Specs: Windows Vista
I have coffecup form builder. I used it to create a swf contact form on one site and it worked fine. I have the form redirect to a thank you page.
The second site I used it on gives back the following syntax error after submitting. It just won’t go to the Thankyou page.
Parse error: syntax error, unexpected $end in /home/fantasti/public_html/djform.php on line 1096
I have compared both the php page and the xml page in both sites and there is no difference except of course for the domains.
The only difference is that the problem site uses frames. The thankyou page should come up within the frame the same as the other pages.
I have searched the net and posted on coffecup forum but can not find any answers to this specific problem. Can someone please please help as customers can not reach us.
By the way, I need an idiots guide as I know nothing about php or java script.

See More: syntax error in form redirect, desperate

Report •

June 9, 2009 at 02:16:03
I'm not familiar with xml syntax, but with php, an unexpected $end is *almost* always a missing bracket, parenthesis, or <?php ?> somewhere. Double check your source for [], {}, () pairs, or perhaps <?php ?> pairs

The error could be anywhere within your source, so it may be best to use the block comment to exclude large parts of your code, and work with small blocks at a time that have the brackets and/or parens or several <?php .. ?> code blocks.

If you aren't familiar with php, the block comment is /* ... */ anything contained within the /* */ will be commented out to the script parser.

If you can, post the php source code

Good luck.

Report •

June 9, 2009 at 02:59:24
This doesn't seem to be accepting my follow up. What am I doing wrong. I tried to post the code from the php page twice and it said done but nothing was there

Report •

June 9, 2009 at 06:18:40
I don't what the issue is, but perhaps it's too long. You might try pasting small segments over a few replies.

code snippit

Report •

Related Solutions

June 9, 2009 at 06:44:43
This is the area where they say there is a syntax error.
      // If the user has provided a message, formit it for HTML
      if($message !== null)
         $message = '

' . htmlentities($message, ENT_QUOTES) . '</p>';
      die( <<<EOHTML
<?xml version="1.0" encoding="utf-8"?>      
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
<html xmlns="" xml:lang="en" lang="en">

  <title>{$page_title}CoffeeCup Form Builder</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="robots" content="noindex,nofollow" />
  <style type="text/css">
       border-top: 1px solid #666;
       font-size:  .85em;

Report •

June 9, 2009 at 10:31:23
die ( *looks* like the problem. If that code snippit is all the php you've got, then it's missing the closing ) and the ending ?>


print <<<EOHTML
html code

With the above, there cannot be white space after or maybe it's before the EOHTML; line and it (EOHTML) must be on its own line.

One thing nice about php is you can easily mix php code with html.

   echo $_SERVER["REMOTE_ADDR"];
   $x = 0;
<td><?php echo $_SEVER["PHP_SELF"];?></td>

<?php echo date('m d, y', time());?>

   if($x == 0) { ?>
<p>x = <?php echo $x; ?></p>
<?php } ?>

Hope that helps.

Report •

Ask Question