|
|
#10 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Oct 2005
7 posts
Gave thanks: 0
Thanked 0 times
|
I get this error:
Parse error: parse error, unexpected T_CASE in /home/vesutij/public_html/index2.php on line 362 I'm a bit confused. It is okay for me to have news.php a PHP page while my regular ones are HTML documents, right? Also, I installed the PHP program Cutenews. If you know what I'm talking about, when you click 'Comments', the page content shows perfectly. Its the only thing on my website that is showing right now.... Last edited by Uchiha-Kun; October 12th, 2005 at 6:37 PM.. |
|
|
|
|
|
#11 (permalink) |
|
rocks your socks.
Resident.
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,155 posts
Gave thanks: 8
Thanked 35 times
|
There is no default set. You need to set a default when you use case I believe. I could be wrong. I've just been using Haugland's code as examples for my own work.
|
|
|
|
|
|
#12 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,087 posts
Gave thanks: 48
Thanked 131 times
|
I have no idea what's on that line, so could you maybe paste that here? I just put both code examples into a file, it appears that you might have missed the "switch ($_GET[page) {" line...
You're not required to have a default value in there, but it sure beats the hell out of random errors when there's an incorrect or no value. I've never used Cutenews before, so unfortunately I can only picture what you're refering too. |
|
|
|
|
|
#14 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Oct 2005
7 posts
Gave thanks: 0
Thanked 0 times
|
errr...default? Do you mean the layout I want to load or the content on the first page?
Well, what exactly is around that area is: PHP Code:
|
|
|
|
|
|
#15 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Lives in N,BC,CA
8,087 posts
Gave thanks: 48
Thanked 131 times
|
Yeah, you're missing exactly what I thought you were. You need to have the switch stuff in there too.
For some background information on how switch statements work; http://ca.php.net/switch |
|
|
|
|
|
#16 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Oct 2005
Lives in Canada
Hosted on Pass24
8 posts
Gave thanks: 0
Thanked 0 times
|
PHP Code:
|
|
|
|
|
|
#17 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Oct 2005
7 posts
Gave thanks: 0
Thanked 0 times
|
There is no parse error now but my problem goes back to the beginning; other pages are working [when I click on something else 'index2.php?page=faq' for example it shows the same thing as the news.php page]
|
|
|
|
|
|
#18 (permalink) |
|
Surpass Fan
Super #1
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
|
You have to modify the case logic to suit your own needs. Use the example as just that; an example or template. Do not just copy and paste.
__________________
- Evan Charlton | [site] | Server - SH58 |
|
|
|