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 2773
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:
<?php require_once('Connections/carresa.php'); ?>...
|
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 5 that I installed on my server. After...
|
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
following "END". Expected tokens may include: "JOIN...
|
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 View' property set to
'Continuous Forms' and am...
|
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 substr(tablespace_name,1,30) as "Tablespace Name",
case...
|
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
this is the section of code.
if (isset($row4)) {...
|
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 terminated by a *space* followed by a newline
...
|
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: application/xmsdownload");
header("Content-Disposition:...
|
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 php worked on my 4.x php server but I get...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |