I have a form which I use to get a date range for reports. I am
beginning to build many more reports than initially thought, and I use
this form in each one. I expect to manage/improve the form, so I want
to just include it from it's own file.
I want to break out of PHP for my form area (instead of having to deal
with a whole bunch of print/echo statements and the added debugging
layer), but am getting an error.
ERROR:
Parse error: syntax error, unexpected $end in /home/voyager1/
public_html/turbine/dateRange_form.inc on line 17
How do I remedy the error?
Here are the ENTIRE contents of dateRange_form.inc:
?>
<form name="dateRange" method="GET" >
<table>
<tr>
<td align="center" class="">From date:
<input name='fromDate' value='<?=date("Y-m-
d",mktime(0,0,0,date("m")-1,1,date("Y")));?>' size=15>
</td>
<td align="center" class="">To date:
<input name='toDate' value='<?=date("Y-m-
t",mktime(0,0,0,date("m")-1,1,date("Y")));?>' size=15>
</td>
<td align="center">
<input type='submit' value='Search'>
</td>
</tr>
</table>
</form>
<?PHP 6 1340
Message-ID:
<74**********************************@p10g2000prf. googlegroups.comfrom
Mo contained the following:
>ERROR: Parse error: syntax error, unexpected $end in /home/voyager1/ public_html/turbine/dateRange_form.inc on line 17
How do I remedy the error?
Works fine for me. You probably don't have short tags enabled (short
tags are not generally regarded as a good idea anyway)
Try replacing '<?= ' with '<?php echo '
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011 http://slipperyhill.co.uk - http://4theweb.co.uk
On Oct 9, 3:11*pm, Geoff Berrow <blthe...@ckdog.co.ukwrote:
Message-ID:
<74d6d4a2-caa1-4d25-9e20-c5b7ad76a...@p10g2000prf.googlegroups.comfrom
Mo contained the following:
ERROR:
Parse error: syntax error, unexpected $end in /home/voyager1/
public_html/turbine/dateRange_form.inc on line 17
How do I remedy the error?
Works fine for me. You probably don't have short tags enabled (short
tags are not generally regarded as a good idea anyway)
Try replacing '<?= ' with '<?php echo '
--
Geoff Berrow *0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011http://slipperyhill.co.uk-http://4theweb.co.uk
Hmm.
I'm glad it works (for you at least), but am still stymied.
Short tags are enabled, and the code works as-is when inline, but get
the error when used via include.
The error references line 17. That it the last line. The one which re-
opens PHP.
Any further ideas?
~ Mo
Mo wrote:
On Oct 9, 3:11 pm, Geoff Berrow <blthe...@ckdog.co.ukwrote:
>Message-ID: <74d6d4a2-caa1-4d25-9e20-c5b7ad76a...@p10g2000prf.googlegroups.comfrom Mo contained the following:
>>ERROR: Parse error: syntax error, unexpected $end in /home/voyager1/ public_html/turbine/dateRange_form.inc on line 17 How do I remedy the error?
Works fine for me. You probably don't have short tags enabled (short tags are not generally regarded as a good idea anyway)
Try replacing '<?= ' with '<?php echo '
-- Geoff Berrow 0110001001101100010000000110 001101101011011001000110111101100111001011 100110001101101111001011100111010101101011http://slipperyhill.co.uk-http://4theweb.co.uk
Hmm.
I'm glad it works (for you at least), but am still stymied.
Short tags are enabled, and the code works as-is when inline, but get
the error when used via include.
The error references line 17. That it the last line. The one which re-
opens PHP.
Any further ideas?
~ Mo
Yeah leave out the ?in the beginning and <?php at the end
Scotty
On Oct 9, 3:49*pm, FutureShock <futuresho...@att.netwrote:
Mo wrote:
On Oct 9, 3:11 pm, Geoff Berrow <blthe...@ckdog.co.ukwrote:
Message-ID:
<74d6d4a2-caa1-4d25-9e20-c5b7ad76a...@p10g2000prf.googlegroups.comfrom
Mo contained the following:
>ERROR: Parse error: syntax error, unexpected $end in /home/voyager1/ public_html/turbine/dateRange_form.inc on line 17 How do I remedy the error?
Works fine for me. You probably don't have short tags enabled (short
tags are not generally regarded as a good idea anyway)
Try replacing '<?= ' with '<?php echo '
--
Geoff Berrow *0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011http://slipperyhill.co.uk-http://4theweb.co.uk
Hmm.
I'm glad it works (for you at least), but am still stymied.
Short tags are enabled, and the code works as-is when inline, but get
the error when used via include.
The error references line 17. That it the last line. The one which re-
opens PHP.
Any further ideas?
~ Mo
Yeah leave out the ?in the beginning and <?php at the end
Scotty
Since my include is, naturally, withhin a PHP block, I presumed that
it would expect PHP, and that close and open tags would be required if
I was including HTML.
Thanks-a-bunch.
Your solution SIMPLY WORKS ... but why?
Why aren't echo/print statements needed?
~ Mo
..oO(Mo)
>Since my include is, naturally, withhin a PHP block, I presumed that it would expect PHP, and that close and open tags would be required if I was including HTML.
When including a file, PHP jumps back into HTML mode. You always have to
use <?php ... ?tags in an include file around your PHP code. This is
described in the manual.
Micha
On Oct 9, 4:19*pm, Michael Fesser <neti...@gmx.dewrote:
.oO(Mo)
Since my include is, naturally, withhin a PHP block, I presumed that
it would expect PHP, and that close and open tags would be required if
I was including HTML.
When including a file, PHP jumps back into HTML mode. You always have to
use <?php ... ?tags in an include file around your PHP code. This is
described in the manual.
Micha
Ah, there it is.
I've found it now where it specifies that in the manual.
Thanks to all.
~ Mo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sarath |
last post by:
I am working with an application using ASP, getting below error when i am
trying to include new asp include file.
_____________________________________________________________________
Microsoft...
|
by: wukexin |
last post by:
Help me, good men. I find mang books that introduce bit "mang header
files",they talk too bit,in fact it is my too fool, I don't learn it, I have
do a test program, but I have no correct doing...
|
by: Josh |
last post by:
Hi All,
I know this is a novice question that I should be able to solve through
searching but I have Googled my fingers off and not found anything that
seems to help.
I have the following...
|
by: Derrick Coetzee |
last post by:
It seems like, in every C source file I've ever seen, there has been a
very definite include order, as follows:
- include system headers
- include application headers
- include the header...
|
by: zolli |
last post by:
Hi,
I've been banging my head against this for a while now. Hoping someone
here can shed some light on what's going on.
On including stdlib.h in a file, I'm seeing the following errors:
...
|
by: David Mathog |
last post by:
One thing that can make porting C code from one
platform to another miserable is #include. In particular,
the need to either place the path to an included file within
the #include statement or to...
|
by: chat |
last post by:
Hi, every body.
I have 3 files like this:
--------------------------------------------------------
file name : header.h
#ifndef TEST_H
#define TEST_H
int a=1;
double b=0.5;
|
by: novice |
last post by:
Hi guys,
I am getting the following errors while compiling my program.
Since I have never encountered these errors before, I have no idea what
is making them pop up. Any help would be great....
|
by: NewClient |
last post by:
Hi,
I'm a novice. Here is my problem:
I have an asp file to export an Excel table whose data comes from SQL. This file has an 'include' file containing a function getVariable(Name). This...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |