I have written a php script (test3.php), which I attached as a text file. Its includes are also attached as text files. I'm trying to run the script here: http://www.wondergy.com/phptestbed/test3.php
The problem I'm having is the frustrating Unexpected $end. Yes, I know that it usually means something isn't being closed correctly. The problem is, I can't figure out what. To make the problem stranger, I can get it to parse when I break it up into three files and include the two files in a large If...Else statement. The first time the script runs, it goes to the Else part of the statement and includes form3.php. Perfect, the form displays and the world is happy. No unexpected $end error. BUT - when I take that very same code (from form3.php) and include it inside the else brackets {}, I get the unexpected $end error. How can this be? How can I fix this?
On line 33 of handle3.php, make sure EMAIL_RESPONSE has no whitespace before it, that is, it should be the very first thing on the line. Consider the following: -
// good
-
echo <<<HTML
-
<input>...</input>
-
HTML;
-
// bad
-
echo <<<HTML
-
<input>...</input>
-
HTML;
-
Mark.
4 2655
The error text is? Short of running the code ourselves (extra effort on our part) we do not know what part of the code we should be looking at. Also, instead of providing the files as attachments, if the files do not have 1000+ lines, just post them here (wrapped with [code] tags) for us to see.
Mark.
On line 33 of handle3.php, make sure EMAIL_RESPONSE has no whitespace before it, that is, it should be the very first thing on the line. Consider the following: -
// good
-
echo <<<HTML
-
<input>...</input>
-
HTML;
-
// bad
-
echo <<<HTML
-
<input>...</input>
-
HTML;
-
Mark.
Perfect! Thank you! (............adding extra characters to have more than 20....)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: James Campbell |
last post by:
ok, I am totally new to php and come from an asp background.
I basically want to do an If > then > else > end if statement:
my page is:
...
|
by: Ehartwig |
last post by:
I recently created a script for user verification, solved my emailing
issues, and then re-created the script in order to work well with the
new PHP...
|
by: Najm Hashmi |
last post by:
Hi all ,
I am trying to create a store procedure and I get the following error:
SQL0104N An unexpected token "END-OF-STATEMENT" was found...
|
by: Cro |
last post by:
Dear Access Developers,
The 'Allow Additions' property of my form is causing unexpected
results.
I am developing a form that has its 'Default...
|
by: P |
last post by:
Hi all,
I'm trying to run the following code taken from
http://blogs.ittoolbox.com/database/technology/archives/006045.asp#
select...
|
by: Jim Michaels |
last post by:
C:\prj\quiz\withusers>php tareports.php
PHP Parse error: syntax error, unexpected T_ELSE in
C:\prj\quiz\withusers\tareports.php on line 205
...
|
by: Andrew McLean |
last post by:
I have a bunch of csv files that have the following characteristics:
- field delimiter is a comma
- all fields quoted with double quotes
- lines...
|
by: JRough |
last post by:
I'm trying to use output buffering to cheat so i can print to excel
which is called later than this header().
header("Content-type:...
|
by: LordZyse |
last post by:
Just so everyone can know, I would LOVE to stay with yellowtip webserver, if you know how to install the GD files to it PLEASE let me know.
This...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
| |