Computing.Net > Forums > Web Development > syntax error in form redirect, desperate

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

syntax error in form redirect, desperate

Reply to Message Icon

Name: rugrotts
Date: June 9, 2009 at 01:11:10 Pacific
OS: Windows Vista
Subcategory: PHP
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: shutat
Date: June 9, 2009 at 02:16:03 Pacific
Reply:

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.


0

Response Number 2
Name: rugrotts
Date: June 9, 2009 at 02:59:24 Pacific
Reply:

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


0

Response Number 3
Name: shutat
Date: June 9, 2009 at 06:18:40 Pacific
Reply:

I don't what the issue is, but perhaps it's too long. You might try pasting small segments over a few replies.

<PRE>
code snippit
</PRE>


0

Response Number 4
Name: rugrotts
Date: June 9, 2009 at 06:44:43 Pacific
Reply:

Hi
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" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">      
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <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">
   <!--
    div#script_info
    {
       border-top: 1px solid #666;
       font-size:  .85em;
    }
   -->
  </style>
</head>



0

Response Number 5
Name: shutat
Date: June 9, 2009 at 10:31:23 Pacific
Reply:

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

<?php

print <<<EOHTML
html code
EOHTML;
?>

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.

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

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

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

Hope that helps.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

Dreamweaver CS3 Part of site only working...


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: syntax error in form redirect, desperate

syntax error, unexpected $end www.computing.net/answers/webdevel/syntax-error-unexpected-end/2236.html

mysql_numrows() error in php www.computing.net/answers/webdevel/mysqlnumrows-error-in-php/770.html

Microsoft JET Database Engine error www.computing.net/answers/webdevel/microsoft-jet-database-engine-error/3442.html