Help With PhP

WarriorH

New Member
Messages
55
Reaction score
0
Points
0
I am trying to add a <?php include("createserver.php"); ?> in position in my script. Every time I try to place it in it keeps giving me errors. Could some one fix it and make it show up in the correct spot?

I labeled the spot I would like this 'include' tag to be in with [PLEASE ADD INCLUDE HERE!]


<?php
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
echo "<head>\n";
echo " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n";
echo " <title>BlueDream ClanTemplate &raquo; ClanTemplates.com!</title>\n";
echo " <link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
echo "</head>\n";
echo "<body><!-- start container -->\n";
echo "<div id=\"container\"><!-- start navigation -->\n";
echo " <div id=\"nav_holder\">\n";
echo " <ul id=\"navigation\">\n";
echo " <li><a class=\"start\" href=\"index.html\">Home Page</a>\n";
echo " <li><a href=\"index.html\">Scrim List</a>\n";
echo " <li><a href=\"index.html\">Create Scrim</a>\n";
echo " <li><a href=\"index.html\">Find Scrim</a>\n";
echo " <li><a href=\"index.html\">Report User</a>\n";
echo " <li><a href=\"index.html\">Sponsors</a>\n";
echo " <li><a href=\"index.html\">About Site</a>\n";
echo " <li><a href=\"index.html\">Need Help?</a></li>\n";
echo " \n";
echo " </ul>\n";
echo " </div><!-- end navigation-->\n";
echo " <h1 id=\"banner\">BlueDream » ClanTemplates.com</h1>\n";
echo " <div class=\"banner_below\">\n";
echo " <div class=\"banner_below_content\">Recent Scrims</div>\n";
echo " <div class=\"banner_below_center\">Top 5 Clans</div>\n";
echo " <div class=\"banner_below_content\">Recent Bans</div>\n";
echo " </div>\n";
echo " <div id=\"content_gradient\">\n";
echo " <div id=\"content\">\n";
echo " <div id=\"left\"><!-- start box left -->\n";
echo " <div class=\"box_left_holder\">\n";
echo " <div class=\"box_left_content\">\n";
echo " <ul class=\"list\">\n";
echo " <li class=\"cs\"><strong>2vs2 | East</strong><a href=\"#\">v8.Gamers</a>\n";
echo " <li class=\"cs\"><strong>5vs5 | East</strong><a href=\"#\">FM00N Haters</a>\n";
echo " <li class=\"cs\"><strong>4vs4 | Central</strong><a href=\"#\">DynastySh00ters</a>\n";
echo " <li class=\"cs\"><strong>3vs3 | West</strong><a href=\"#\">MisfitMafia</a>\n";
echo " <li class=\"cs\"><strong>4vs4 | East</strong><a href=\"#\">HeroMen</a>\n";
echo " <li class=\"cs\"><strong>5vs5 | Central</strong><a href=\"#\">xT5^</a></li>\n";
echo " </ul>\n";
echo " <div class=\"alignright\"><a href=\"#\">More...</a></div>\n";
echo " </div>\n";
echo " </div>\n";
echo " <div class=\"box_left_footer\"></div><!-- end box left-->\n";
echo " <div class=\"box_left_header\">Recent Articles</div>\n";
echo " <div class=\"box_left_holder\">\n";
echo " <div class=\"box_left_content\">\n";
echo " <img alt=\"\" src=\"imgs/twista_img.gif\" >\n";
echo " Slaava \"Twista\" Räsänen is the latest addition to the Finnish Counter-Strike team Logitech. With Logitech, Twista ended up on a 4th place at the GameGune Tournament in Bilbao, Spain, two weeks ago. This interview is about his thoughts on the tournament, his team, himself and the future.\n";
echo " </div>\n";
echo " </div>\n";
echo " <div class=\"box_left_footer\"></div>\n";
echo " <div class=\"box_left_header\">Search</div>\n";
echo " <div class=\"box_left_holder\">\n";
echo " <div class=\"box_left_content\">\n";
echo " <form method=\"post\" action=\"\">\n";
echo " <input name=\"search\" value=\"Search Information...\" class =\"search_input\" >\n";
echo " <input name=\"submit\" type=\"submit\" class=\"search_submit\" value=\"Submit Query\">\n";
echo " </form>\n";
echo " <div class=\"alignright\"><a href=\"#\">Advanced Search</a></div>\n";
echo " </div>\n";
echo " </div>\n";
echo " <div class=\"box_left_footer\"></div>\n";
echo " <div class=\"box_left_header\">Head Sponsors</div>\n";
echo " <div class=\"box_left_holder\">\n";
echo " <div class=\"box_left_content\">\n";
echo " <a href=\"http://www.clanshowcase.com\"><img alt=\"\" src=\"imgs/sponsor_cs.gif\" ></a>\n";
echo " <a href=\"http://www.clantemplates.com\"><img class=\"sponsor\" alt=\"\" src=\"imgs/sponsor_ct.gif\" ></a>\n";
echo " <a href=\"http://www.shock.in\"><img alt=\"\" src=\"imgs/sponsor_sm.gif\" ></a><img class=\"sponsor\" alt=\"\" src=\"imgs/sponsor_sc.gif\" >\n";
echo " </div>\n";
echo " </div>\n";
echo " <div class=\"box_left_footer\"></div>\n";
echo " <div class=\"box_left_footer\"></div>\n";
echo " </div>\n";
echo " <div id=\"right\"><!-- start box center -->\n";
echo " <div class=\"box_left_holder\">\n";
echo " <div class=\"box_left_content\">\n";
echo " <ul class=\"list\">\n";
echo " <li class=\"cs\"><strong>Rank 1</strong><a href=\"#\">FM00n Haters</a> <span class=\"red\">801 points</span>\n";
echo " <li class=\"cs\"><strong>Rank 2</strong><a href=\"#\">V8. Gamers</a> <span class=\"red\">789 points</span>\n";
echo " <li class=\"cs\"><strong>Rank 3</strong><a href=\"#\">MisfitMafia</a> <span class=\"red\">753 points</span>\n";
echo " <li class=\"cs\"><strong>Rank 4</strong><a href=\"#\">N00berz</a> <span class=\"red\">745 points</span>\n";
echo " <li class=\"cs\"><strong>Rank 5</strong><a href=\"#\">The Elite Ten</a> <span class=\"red\">744 points</span></li>\n";
echo " \n";
echo " </ul>\n";
echo " <div class=\"alignright\"><a href=\"#\">More...</a></div>\n";
echo " </div>\n";
echo " <div class=\"box_left_footer\"></div>\n";
echo " </div><!-- end box center -->\n";
echo " <div class=\"box_right_holder\">\n";
echo " <div class=\"box_left_content\">\n";
echo " <ul class=\"list\">\n";
echo " <li><strong>Hacking</strong><a href=\"#\">PotHeads</a>\n";
echo " <li><strong>Hacking</strong><a href=\"#\">H4xOwnz</a>\n";
echo " <li><strong>Hacking</strong><a href=\"#\">GangstaRep</a></li>\n";
echo " </ul>\n";
echo " <div class=\"alignright\"><a href=\"#\">More...</a></div>\n";
echo " </div>\n";
echo " <div class=\"box_left_footer\"></div>\n";
echo " </div>\n";
echo " <div class=\"clear\"></div><!-- start content post -->\n";
echo " <div class=\"content_header\">Recent News Events</div>\n";
echo " <div class=\"content_holder\">\n";
echo " <div class=\"content_box\">\n";
echo " <div class=\"news_title\">When Will The Site Be Released For Public Users?</div>\n";
echo " <strong>:: Realistic Time Frame</strong> \n";
echo "[ PLEASE ADD INCLUDE HERE]
echo " </div>\n";
echo " </div>\n";
echo " <div class=\"content_footer\"></div><!-- end content post -->\n";
echo " </div>\n";
echo " </div>\n";
echo " </div><!-- start footer -->\n";
echo " <div class=\"footer_above\"></div>\n";
echo " <div class=\"footer\">\n";
echo " <div class=\"alignleft\">\n";
echo " Copyright 2008 © Custom Leagues,\n";
echo " Copyright 2008 © <a href=\"http://www.clantemplates.com\">ClanTemplates.com</a> - \n";
echo " Designed by <a href=\"http://www.shock.in\">Dream</a> - \n";
echo " Coded by <a href=\"http://www.strictcoding.net\">Custom Leagues</a> and by <a href=\"http://www.strictcoding.net\">Lee</a> \n";
echo " </div>\n";
echo " \n";
echo " </div><!-- end footer -->\n";
echo "</div><!-- end container -->\n";
echo "</body>\n";
echo "</html>\n";
?>
 

LHVWB

New Member
Messages
1,308
Reaction score
0
Points
0
First of all the way that you have set up your code is no very good, you should always try to avoid using millions of calls to the echo function unless you really have to. Instead you can actually just put the html code outside of the <?php ?> tags and it will be treated just like normal html.

I believe that the main issue you are having is trying to put a <?php tag within another one, which doesn't work because the php tags cannot go inside each other.

Below is your code, but I have removed all the calls to the echo() function, and added in the php section which will include the file. I also turned all of the \" into just " and I got rid of all of the \n code.

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <title>BlueDream ClanTemplate &raquo; ClanTemplates.com!</title>
 <link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body><!-- start container -->
<div id="container"><!-- start navigation -->
 <div id="nav_holder">
 <ul id="navigation">
 <li><a class="start" href="index.html">Home Page</a>
 <li><a href="index.html">Scrim List</a>
 <li><a href="index.html">Create Scrim</a>
 <li><a href="index.html">Find Scrim</a>
 <li><a href="index.html">Report User</a>
 <li><a href="index.html">Sponsors</a>
 <li><a href="index.html">About Site</a>
 <li><a href="index.html">Need Help?</a></li>
 
 </ul>
 </div><!-- end navigation-->
 <h1 id="banner">BlueDream » ClanTemplates.com</h1>
 <div class="banner_below">
 <div class="banner_below_content">Recent Scrims</div>
 <div class="banner_below_center">Top 5 Clans</div>
 <div class="banner_below_content">Recent Bans</div>
 </div>
 <div id="content_gradient">
 <div id="content">
 <div id="left"><!-- start box left -->
 <div class="box_left_holder">
 <div class="box_left_content">
 <ul class="list">
 <li class="cs"><strong>2vs2 | East</strong><a href="#">v8.Gamers</a>
 <li class="cs"><strong>5vs5 | East</strong><a href="#">FM00N Haters</a>
 <li class="cs"><strong>4vs4 | Central</strong><a href="#">DynastySh00ters</a>
 <li class="cs"><strong>3vs3 | West</strong><a href="#">MisfitMafia</a>
 <li class="cs"><strong>4vs4 | East</strong><a href="#">HeroMen</a>
 <li class="cs"><strong>5vs5 | Central</strong><a href="#">xT5^</a></li>
 </ul>
 <div class="alignright"><a href="#">More...</a></div>
 </div>
 </div>
 <div class="box_left_footer"></div><!-- end box left-->
 <div class="box_left_header">Recent Articles</div>
 <div class="box_left_holder">
 <div class="box_left_content">
 <img alt="" src="imgs/twista_img.gif" >
 Slaava "Twista" Räsänen is the latest addition to the Finnish Counter-Strike team Logitech. With Logitech, Twista ended up on a 4th place at the GameGune Tournament in Bilbao, Spain, two weeks ago. This interview is about his thoughts on the tournament, his team, himself and the future.
 </div>
 </div>
 <div class="box_left_footer"></div>
 <div class="box_left_header">Search</div>
 <div class="box_left_holder">
 <div class="box_left_content">
 <form method="post" action="">
 <input name="search" value="Search Information..." class ="search_input" >
 <input name="submit" type="submit" class="search_submit" value="Submit Query">
 </form>
 <div class="alignright"><a href="#">Advanced Search</a></div>
 </div>
 </div>
 <div class="box_left_footer"></div>
 <div class="box_left_header">Head Sponsors</div>
 <div class="box_left_holder">
 <div class="box_left_content">
 <a href="http://www.clanshowcase.com"><img alt="" src="imgs/sponsor_cs.gif" ></a>
 <a href="http://www.clantemplates.com"><img class="sponsor" alt="" src="imgs/sponsor_ct.gif" ></a>
 <a href="http://www.shock.in"><img alt="" src="imgs/sponsor_sm.gif" ></a><img class="sponsor" alt="" src="imgs/sponsor_sc.gif" >
 </div>
 </div>
 <div class="box_left_footer"></div>
 <div class="box_left_footer"></div>
 </div>
 <div id="right"><!-- start box center -->
 <div class="box_left_holder">
 <div class="box_left_content">
 <ul class="list">
 <li class="cs"><strong>Rank 1</strong><a href="#">FM00n Haters</a> <span class="red">801 points</span>
 <li class="cs"><strong>Rank 2</strong><a href="#">V8. Gamers</a> <span class="red">789 points</span>
 <li class="cs"><strong>Rank 3</strong><a href="#">MisfitMafia</a> <span class="red">753 points</span>
 <li class="cs"><strong>Rank 4</strong><a href="#">N00berz</a> <span class="red">745 points</span>
 <li class="cs"><strong>Rank 5</strong><a href="#">The Elite Ten</a> <span class="red">744 points</span></li>
 
 </ul>
 <div class="alignright"><a href="#">More...</a></div>
 </div>
 <div class="box_left_footer"></div>
 </div><!-- end box center -->
 <div class="box_right_holder">
 <div class="box_left_content">
 <ul class="list">
 <li><strong>Hacking</strong><a href="#">PotHeads</a>
 <li><strong>Hacking</strong><a href="#">H4xOwnz</a>
 <li><strong>Hacking</strong><a href="#">GangstaRep</a></li>
 </ul>
 <div class="alignright"><a href="#">More...</a></div>
 </div>
 <div class="box_left_footer"></div>
 </div>
 <div class="clear"></div><!-- start content post -->
 <div class="content_header">Recent News Events</div>
 <div class="content_holder">
 <div class="content_box">
 <div class="news_title">When Will The Site Be Released For Public Users?</div>
 <strong>:: Realistic Time Frame</strong> 
<?php
	//	Include the file here.
	include("createserver.php");
?>
 </div>
 </div>
 <div class="content_footer"></div><!-- end content post -->
 </div>
 </div>
 </div><!-- start footer -->
 <div class="footer_above"></div>
 <div class="footer">
 <div class="alignleft">
 Copyright 2008 © Custom Leagues,
 Copyright 2008 © <a href="http://www.clantemplates.com">ClanTemplates.com</a> - 
 Designed by <a href="http://www.shock.in">Dream</a> - 
 Coded by <a href="http://www.strictcoding.net">Custom Leagues</a> and by <a href="http://www.strictcoding.net">Lee</a> 
 </div>
 
 </div><!-- end footer -->
</div><!-- end container -->
</body>
</html>

Note: If you have to use echo statements then remember that they can actually stretch accross multiple lines. eg.

PHP:
<?php

echo " here is some html on the first line.
Here is some more html on the second line.
Even more html on the third line.";

?>
 
Last edited:

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
I'm working on helping him out in IRC as well, think we might've gotten it sorted :)

From what I can tell though we pretty much ended up with the same code you've got there.
 

WarriorH

New Member
Messages
55
Reaction score
0
Points
0
Wow thanks both of you! And thank you for rewriting the code for me, I will use it. :D
Edit:
I gave you credits for helping :D
 
Last edited:
Top