Problem :(

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

The code is uploaded here:

http://www.dale.host.sk/

And there should be a parse error there.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

This is basically what Litazia Tanxashira said but here it is again. Having everything in one echo statement is messy and uneccessary, you especially need to have the include statements separate. The error you got was because within the echo statement you opened and closed php tags. Try this code:

Code: Select all

<?php 
$i = 0;
switch ($id) &#123; 
   case 0: 
		include 'compteur.php';
?>
<html> 
<head> 
	<title>Dales UT2K3 Database</title> 
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
</head> 

<body bgcolor="#000000" text="#CCCCCC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bottommargin="0" rightmargin="0" link="#CCCCCC" vlink="#CCCCCC" alink="#CCCCCC"> 
<table width="1005" border="0" cellspacing="0" cellpadding="0" height="100%"> 
<tr> 
	<td width="150" height="150"><img src="./images/tl.jpg" width="150" height="150"></td> 
	<td width="855" colspan="3"> 
		<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" background="./images/tbg.jpg"> 
		<tr> 
			<td><img src="./images/tl3.jpg" width="100" height="150"></td> 
			<td width="100%">&nbsp;</td> 
			<td><img src="./images/tr.jpg" width="500" height="150"></td> 
		</tr> 
		</table> 
	</td> 
</tr> 
<tr> 
	<td rowspan="2" width="150"> 
		<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" background="./images/lbg.jpg"> 
		<tr> 
			<td><img src="./images/tl2.jpg" width="150" height="188"></td> 
		</tr> 
		<tr>
<!--Main Menu Start--> 
<?php
	include 'mainmenu.php'; 
?>
<!--Main Menu End--> 
			<td valign="top" width="5"><br /></td> 
			<td align="center" valign="top" width="776">
				<p><a href="http://www.gamer.uk.com/cgi-bin/aff_jump.cgi?uid=utdale">
					<img src="http://www.gamer.uk.com/banners/pc/u2_468_pc.gif" border="0" width="468" height="60">
				</a></p> 
				<p align="center"><font size="1" face="Verdana">News</font></p> 
				<p align="left"> 
				<--News-->
				</p>
				<p>&nbsp;</p>
			</td> 
			<td valign="top" width="5">&nbsp;</td> 
		</tr> 
		<tr> 
			<td valign="bottom" width="855" colspan="3"> 
				<p align="center"><font face="Verdana" size="1">Site Designed By <a href="http://www.imahosting.com/cicid/"> Ciced</a></font>
			</td> 
		</tr> 
</table> 
</body> 
</html>
<?php
	break; 
&#125;
?>
Mac
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

I will try that now!
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

ok well how about for the other lot of my pages in the INDEX.PHP file?

Thats gives me a parse error if you download this zip:

http://www.imahosting.com/dale/site.zip

That contains all my INDEX.PHP page which is the whole of my site and can you please experiment.

The zip includes
  • index.php
    mainmenu.php
    june2002.php (news page that needs to be included like main menu where the <--news--> tag is.)
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

Has anyone dont it yet?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Dale wrote:Has anyone dont it yet?
Have you attempted to make changes based on what you've been told? Helping you out with a couple of problems is one thing but you now want all your code rewritten :? .

BTW, I have had a look at your code and the problem with the rest of index.php is the same as the bit that I redid for you. Surely you can look at the top bit and do the same for the rest of the code?

Mac
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

I keep getting parse errors though!
Post Reply