...

View Full Version : Problem with Coding - PHP/HTML/CSS - Not showing page



Keanu
03-20-2007, 05:10 PM
Hello,
My friend recently taught me how to code links in php.. Because well.. Its one of the safest ways to code your links. Or so im told.

Quite a long story short... I'v got this template off a site.. Its coded in html/css.. Yet I want the links in PHP.. So iv changed the format to php, added where the links are ment to be.. added the tags <?php and ?>

But I keep getting the error:
Parse error: syntax error, unexpected '<' in /home/keanu/domains/aro-server.co.uk/public_html/radio/index.php on line 18

Here is the entire code for that page;



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ARO-Radio</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="header">
<div id="logo">

</div>
<div id="topright">
<div id="nav">
<ul>
<?php
<a href="iframe.php?load=news" target="iframe">Home</a>
<a href="iframe.php?load=Feature_Bands" target="iframe">Featured Bands</a>
<a href="iframe.php?load=DJ_Panel" target="iframe">DJ PANEL</a>
<a href="iframe.php?load=Forum" target="iframe">Forum</a>
<a href="iframe.php?load=About" target="iframe">About Us</a>
<a href="iframe.php?load=Contact" target="iframe">Contact Us</a>
?>
</ul>
<div style="clear:both"></div>
</div>
<div id="contenttr"></div>
</div>
</div>
<div id="bottom">
<div id="csoon">
<div class="heading2"></div>
</div>
<div id="videobox"></div>
<div id="player">
<img src="images/circle-topl.jpg" alt="Stop" class="player1" />
<img src="images/circle-topr.jpg" alt="Play" class="player1" />
<img src="images/circle-bottoml.jpg" alt="Pause" class="player1" />
<img src="images/circle-bottomr.jpg" alt="F.Forward" class="player1" />
</div>
<div id="footer">
<ul>
<?php
<a href="iframe.php?load=news" target="iframe">Home</a>
<a href="iframe.php?load=Feature_Bands" target="iframe">Featured Bands</a>
<a href="iframe.php?load=DJ_Panel" target="iframe">DJ PANEL</a>
<a href="iframe.php?load=Forum" target="iframe">Forum</a>
<a href="iframe.php?load=About" target="iframe">About Us</a>
<a href="iframe.php?load=Contact" target="iframe">Contact Us</a>
?>
</ul><br /><br />
<p class="calign">&copy; Copyright ARO-Radio 2007-2008.</p>
</div>
</div>
</div>
</body>
</html>


Sorry if this is posted in the wrong section.. Due to it being a problem with PHP... I thought... I should stick it in the PHP section..

-Keanu

ltabdiel
03-20-2007, 05:17 PM
try this:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ARO-Radio</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="header">
<div id="logo">

</div>
<div id="topright">
<div id="nav">
<ul>
<a href="iframe.php?load=news" target="iframe">Home</a>
<a href="iframe.php?load=Feature_Bands" target="iframe">Featured Bands</a>
<a href="iframe.php?load=DJ_Panel" target="iframe">DJ PANEL</a>
<a href="iframe.php?load=Forum" target="iframe">Forum</a>
<a href="iframe.php?load=About" target="iframe">About Us</a>
<a href="iframe.php?load=Contact" target="iframe">Contact Us</a>
</ul>
<div style="clear:both"></div>
</div>
<div id="contenttr"></div>
</div>
</div>
<div id="bottom">
<div id="csoon">
<div class="heading2"></div>
</div>
<div id="videobox"></div>
<div id="player">
<img src="images/circle-topl.jpg" alt="Stop" class="player1" />
<img src="images/circle-topr.jpg" alt="Play" class="player1" />
<img src="images/circle-bottoml.jpg" alt="Pause" class="player1" />
<img src="images/circle-bottomr.jpg" alt="F.Forward" class="player1" />
</div>
<div id="footer">
<ul>
<a href="iframe.php?load=news" target="iframe">Home</a>
<a href="iframe.php?load=Feature_Bands" target="iframe">Featured Bands</a>
<a href="iframe.php?load=DJ_Panel" target="iframe">DJ PANEL</a>
<a href="iframe.php?load=Forum" target="iframe">Forum</a>
<a href="iframe.php?load=About" target="iframe">About Us</a>
<a href="iframe.php?load=Contact" target="iframe">Contact Us</a>
</ul><br /><br />
<p class="calign">&copy; Copyright ARO-Radio 2007-2008.</p>
</div>
</div>
</div>
</body>
</html>


think the issue was in your addition of the <?php ?> tags

Keanu
03-20-2007, 05:37 PM
Hey,
Thank you for your help!

Looks like its working now.. but its stacking downwards? when it used to stack across?... Any way to fix that?

Thanks in advance!
-Keanu

Nightfire
03-20-2007, 05:43 PM
For your css you'd have


#nav li{
display:inline;
}



<div id="nav">
<ul>
<li><a href="iframe.php?load=news" target="iframe">Home</a></li>
<li><a href="iframe.php?load=Feature_Bands" target="iframe">Featured Bands</a></li>
<li><a href="iframe.php?load=DJ_Panel" target="iframe">DJ PANEL</a></li>
<li><a href="iframe.php?load=Forum" target="iframe">Forum</a></li>
<li><a href="iframe.php?load=About" target="iframe">About Us</a></li>
<li><a href="iframe.php?load=Contact" target="iframe">Contact Us</a></li>
</ul>

Keanu
03-20-2007, 05:52 PM
Hey,

Thanks for the help!
Im having one more tiny problem...
http://www.radio.aro-server.co.uk/index1.php .. You see "Featured Bands" Is there any way to make that onto one line? And the ones beside it.. Where you roll over them.. And they go normal? Is there any way to make them stay like the one saying "DJ PANEL"

Once agian, thanks in advance!
-Keanu

aedrin
03-20-2007, 06:34 PM
Because well.. Its one of the safest ways to code your links. Or so im told.

It is?

Keanu
03-20-2007, 06:47 PM
It is?

Yeah.. Or so im told.. Because they can't actually see the file or where the file is stored.. So if your really safe-freak.. You could have something like "newfolder"x30 then the file..

They'd never get it...

-Keanu

aedrin
03-20-2007, 07:50 PM
I suppose in regards to that it is "safer". Even though you're sending it to the user anyway, so I'm not sure what you're preventing.

Remember that when you're including something that contains user input (anything from _GET/_POST), that you do some serious filtering to ensure people can't insert things they shouldn't.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum