dontbeblocked Posted April 15, 2007 Share Posted April 15, 2007 I have a proxy script that I am trying to get working on my server but for some reason everytime I try to go to the site it gives me an error that looks like this: Parse error: syntax error, unexpected T_CASE in /home/p33n0r/public_html/index.php on line 27 This is lines 20-30 in index.php: </style> </head> <body onload="document.getElementById('address_box').focus()"> <div id="container"> <h1 align="center" class="style1" id="title"><font color="#FFFFFF" size="+4"><u>p33n0r</u></font></h1> <?php break; case 'error': echo '<div id="error"><p>'; switch ($data['group']) I have hosted this EXACT SAME SCRIPT on a few other php hosting sites and it works (fairly well) and doesn't give me this error. Here is some statistics of the server: PERL version 5.8.7 PHP version 4.4.3 Apache version 1.3.37 (Unix) MySQL version 4.1.22-standard Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/47155-unexpected-t_case-error/ Share on other sites More sharing options...
Guest prozente Posted April 15, 2007 Share Posted April 15, 2007 Case statements are to be used inside of a switch. http://us.php.net/manual/en/control-structures.switch.php Link to comment https://forums.phpfreaks.com/topic/47155-unexpected-t_case-error/#findComment-229969 Share on other sites More sharing options...
dontbeblocked Posted April 15, 2007 Author Share Posted April 15, 2007 Ok I have done what you said but now I have a new error: Parse error: syntax error, unexpected T_STRING in /home/p33n0r/public_html/piss/index.php on line 45 Line 40-50: break; case 'external': switch ($data['error']) { case 1: $message = 'The URL you have tried is black listed'; break; case 2: $message = 'You spelled the URL wrong'; break; } Link to comment https://forums.phpfreaks.com/topic/47155-unexpected-t_case-error/#findComment-229970 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.