| | |
Querystring $end error
![]() |
•
•
Join Date: Nov 2008
Posts: 153
Reputation:
Solved Threads: 0
This is my code - which displays different articles and produces articles as http://www.mysite.com/testpage.php?test=1
However, I get this error:
Parse error: syntax error, unexpected $end in C:\www\vhosts\mylocalhostsite\testing.php on line 73
I have tried for myself to fix it, but keep getting the $end error repeatedly, anyone else done this type of PHP and managed to find a fix for this?
PHP Syntax (Toggle Plain Text)
<html> <body> <? $i=$_GET['day']; switch ($i) { case 1: include("2.php"); break; case 2: include("3.php"); break; case 3: include("4.php"); break; default: //echo "page not found!!!!"; } ?> <!-- <? if($_GET['day']==1){ ?> <?php include("2.php") ?> <? }else if($_GET['day']==2){ ?> <?php include("3.php") ?> <? }else if($_GET['day']==3){ ?> <?php include("4.php") ?> <? }else if($_GET['day']==4){ ?> <?php include("5.php") ?> <? }else if($_GET['day']==5){ ?> <?php include("6.php") ?> <? }else if($_GET['day']==6){ ?> <?php include("7.php") ?> <? }else if($_GET['day']==5){ ?> <?php include("1.php") ?> <? }else if(!is_numeric($_GET['day']) || $_GET['day']<1){ ?> <!--invalid id (or page not found)--> --> <?php $d=date("D"); switch ($d) { case "Mon": include("2.php"); //echo "Today is Monday"; break; case "Tue": include("3.php"); //echo "Today is Tuesday"; break; case "Wed": include("4.php"); //echo "Today is Wednesday"; break; case "Thu": include("5.php"); //echo "Today is Thursday"; break; case "Fri": include("6.php"); //echo "Today is Friday"; break; case "Sat": include("7.php"); //echo "Today is Saturday"; break; case "Sun": include("1.php"); //echo "Today is Sunday"; break; default: //echo "Wonder which day is this ?"; } ?> </body> </html>
However, I get this error:
Parse error: syntax error, unexpected $end in C:\www\vhosts\mylocalhostsite\testing.php on line 73
I have tried for myself to fix it, but keep getting the $end error repeatedly, anyone else done this type of PHP and managed to find a fix for this?
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
0
#3 Oct 28th, 2009
else if(!is_numeric($_GET['day']) || $_GET['day']<1){ ?>
no correspond }
no correspond }
------------------------------------------------------------------
http://www.funnysayings.us
Many funny sayings in this fantastic site! Large collection of funny sayings! Read and use these funny sayings to liven up your day!
http://www.funnysayings.us
Many funny sayings in this fantastic site! Large collection of funny sayings! Read and use these funny sayings to liven up your day!
0
#4 Oct 28th, 2009
Why so many opening and closing tags for PHP?
Get rid of all the unneeded tags, indent your code and missing braces will be more easy to spot.
Get rid of all the unneeded tags, indent your code and missing braces will be more easy to spot.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
•
•
Join Date: Sep 2009
Posts: 607
Reputation:
Solved Threads: 70
-1
#5 Oct 28th, 2009
put the break in the default and forgot the closing brace of last else if()
Last edited by network18; Oct 28th, 2009 at 4:36 am.
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
![]() |
Similar Threads
- Error Microsoft OLE DB/ODBC (0x80004005) Access (ASP)
- Parse error: syntax error, unexpected $end (PHP)
- error (ASP)
- againt error (ASP)
- Code Error..................... (Visual Basic 4 / 5 / 6)
- I get a Runtime Error 424 when trying to access a file in VB (Visual Basic 4 / 5 / 6)
- Delphi Pascal Error (Pascal and Delphi)
- Error message when running ASP login page (ASP)
- Cant figure this error out: "The page you requested, has produced an error" (ASP)
Other Threads in the PHP Forum
- Previous Thread: My head is going to explode if I can't fix this. PLEASE HELP
- Next Thread: Eloctronic Museum in php
Views: 328 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for PHP
access ajax apache array beginner box broken buttons cakephp check checkbox class cms code cookies css curl database date directory display download dropdown drupal dynamic echo email error file files folder form forms function functions header href htaccess html image images include insert ip java javascript joomla jquery limit link login lookup loop mail menu methods mlm mod_rewrite multiple mysql order parse password paypal pdf php problem query radio redirect regex remote script search security select server session sessions shopping soap sort sorting source sql string table unicode update upload url user validate validation variable video web website wordpress xml






