| | |
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 29 Days Ago
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 28 Days Ago
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 28 Days Ago
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: 521
Reputation:
Solved Threads: 61
-1
#5 28 Days Ago
put the break in the default and forgot the closing brace of last else if()
Last edited by network18; 28 Days Ago 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 |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube






