| | |
Querystring $end error
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2008
Posts: 54
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?
-1
#2 Oct 27th, 2009
You most likely forget a closing }.
Google is your friend.
Use [code] tags.
If you have found a solution to your problem, please mark the thread as SOLVED.
Use [code] tags.
If you have found a solution to your problem, please mark the thread as SOLVED.
•
•
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: 528
Reputation:
Solved Threads: 62
-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 5: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
| Thread Tools | Search this Thread |
ajax apache api array basics beginner binary bounce broken cakephp checkbox class cms code codingproblem combobox cron curl database date display dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration interactive ip java javascript joomla js limit link login mail menu mlm mobile multiple mysql nodes oop outofmemmory paging parse paypal pdf php problem procedure query radio ram random recursion regex remote return script search server sessions smash sms soap source space sql syntax system table tutorial up-to-date update upload url validation validator variable video web webapplications websitecontactform xml youtube






