Jump to content

??


Nightmare
 Share

Recommended Posts

k, I am going to program my site with PHP and than protect it with encryption, but I want my menu to appear on every file on my site when I enter a PHP code in it, how to I do that? here is my PHP code for my menu, please help me out, I'm been trying to figure this all out all week.

<?phpecho "<html>\n";echo "\n";echo "<head>\n";echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" >\n";echo "\n";echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"sddm.css\" >\n";echo "<title>\n";echo "</title>\n";echo "</head>\n";echo "\n";echo "<body>\n";echo "\n";echo "<div class=\"navbar\">\n";echo "<!-- *********************************Start Menu****************************** -->\n";echo "<div class=\"mainDiv\" >\n";echo "<div class=\"topItem\" >General</div>		\n";echo "\n";echo "<div class=\"dropMenu\" ><!-- -->\n";echo "	<div class=\"subMenu\" style=\"display:inline;\">\n";echo "		<div class=\"subItem\"><a href=\"#\">Home</a></div>\n";echo "			<div class=\"subItem\"><a href=\"#\">Forums</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Contact Us</a></div>\n";echo "	</div>\n";echo "</div>\n";echo "</div>\n";echo "<!-- *********************************End Menu****************************** -->\n";echo "<br>\n";echo "<!-- *********************************Start Menu****************************** -->\n";echo "<div class=\"mainDiv\" >\n";echo "<div class=\"topItem\"  >Christ Jesus</div>		\n";echo "<div class=\"dropMenu\" ><!-- -->\n";echo "	<div class=\"subMenu\" style=\"display:inline;\">\n";echo "		<div class=\"subItem\"><a href=\"#\">Quick Facts about Christ</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Why was He here</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">First Coming</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Second Coming</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">How can I Know Him</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Is He really God in the flesh</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Holy Spirit</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Forgiveness</a></div>\n";echo "\n";echo "		</div>\n";echo "</div>\n";echo "</div>\n";echo "<!-- *********************************End Menu****************************** -->\n";echo "<br>\n";echo "<!-- *********************************Start Menu****************************** -->\n";echo "<div class=\"mainDiv\" >\n";echo "<div class=\"topItem\"  >End Times</div>		\n";echo "<div class=\"dropMenu\" ><!-- -->\n";echo "	<div class=\"subMenu\" style=\"display:none;\">\n";echo "		<div class=\"subItem\"><a href=\"#\">Signs of the Last Days</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Armageddon</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">The Rapture</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Anti-Christ</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Second Coming</a></div>\n";echo "		</div>\n";echo "</div>\n";echo "</div>\n";echo "<!-- *********************************End Menu****************************** -->\n";echo "<br>\n";echo "<!-- *********************************Start Menu****************************** -->\n";echo "<div class=\"mainDiv\" >\n";echo "<div class=\"topItem\"  >Sin</div>		\n";echo "<div class=\"dropMenu\" ><!-- -->\n";echo "	<div class=\"subMenu\" style=\"display:none;\">\n";echo "		<div class=\"subItem\"><a href=\"#\">What is Sin</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">How to overcome Sin</a></div>\n";echo "		</div>\n";echo "</div>\n";echo "</div>\n";echo "<!-- *********************************End Menu****************************** -->\n";echo "<br>\n";echo "<!-- *********************************Start Menu****************************** -->\n";echo "<div class=\"mainDiv\" >\n";echo "<div class=\"topItem\"  >Bible</div>		\n";echo "<div class=\"dropMenu\" ><!-- -->\n";echo "	<div class=\"subMenu\" style=\"display:none;\">\n";echo "		<div class=\"subItem\"><a href=\"#\">Is it the Word of God</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">What one is the most accute</a></div>\n";echo "		<div class=\"subItem\"><a href=\"#\">Bible version code</a></div>\n";echo "		</div>\n";echo "</div>\n";echo "</div>\n";echo "<!-- *********************************End Menu****************************** -->\n";echo "<script type=\"text/javascript\" src=\"xpmenuv21.js\"></script>\n";echo "</div>\n";echo "\n";echo "</p>\n";echo "</body>\n";echo "</html>\n";echo "\n";echo "";?>

Link to comment
Share on other sites

Good way to start, is to not have all of the HTML for the page included in the file. The menu file should only be viewed by pages where there is content, so therefore those pages will already have the HTML before/after the content menu. Something like this would be alot better to start:

<html><head><title>hi</title></head><body><?php  include('menuFile.php');?> //other HTML here</body></html>

menuFile.php would look something like:

<ul style="list-style-type:none;"> <li>Link one</li> <li>Link two</li> <li>Etc etc</li></ul>

Link to comment
Share on other sites

it did not work for me :)did I do something wrong? here is my PHP code for the file

<?phpecho "<head>\n";echo "	<title>Who was Jesus Christ</title>\n";echo "	<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";echo "</head>\n";echo "<body>\n";echo "<p>\n";echo "<?php\n";echo "  include('http://endtimewatcher.com/menu.php');\n";echo "?>\n";echo "\n";echo "Here in this page you will read and learn quick and fun facts about Jesus Christ that every reader will enjoy. Young and old alike! \n";echo "<br />\n";echo "<br />\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"A.\" title=\"A.\"></a> Jesus Christ was a man whom lived over 2000 years ago <a href=\"#a\">[a]</a>\n";echo "</p>\n";echo "<p>\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"B.\" title=\"B.\"></a> He was born of virgin <a href=\"#b\">[b]</a>\n";echo "</p>\n";echo "<p>\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"C.\" title=\"C.\"></a> Claim to be God in the flesh (meaning he was God in a human body) <a href=\"#c\">[c]</a>\n";echo "\n";echo "</p>\n";echo "<p>\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"D.\" title=\"D.\"></a> Christ did many miracles to thousands of faithful people <a href=\"#d\">[d]</a>\n";echo "<br />\n";echo "<br />\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"E.\" title=\"E.\"></a>\n";echo "Jesus Christ lived to be about 33 years old <a href=\"#e\">[e]</a>\n";echo "</p>\n";echo "<p>\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"F.\" title=\"F.\"></a> Followed in His father's footsteps (until the age of 30) <a href=\"#f\">[f]</a>\n";echo "\n";echo "</p>\n";echo "<p>\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"G.\" title=\"G.\"></a> Tempted by Satan <a href=\"#g\">[g]</a>\n";echo "</p>\n";echo "<p>\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"H.\" title=\"H.\"></a> Died for no legal or sinful reason (died on the cross (crucifixion)) <a href=\"#h\">[h]</a>\n";echo "</p>\n";echo "<p>\n";echo "<img src=\"http://endtimewatcher.com/images/list/light_list_dot.gif\" /><a name=\"I.\" title=\"I.\"></a> Resurrected from the grave <a href=\"#i\">[i]</a>\n";echo "\n";echo "</p>\n";echo "<p>\n";echo " \n";echo "</p>\n";echo "<br />\n";echo "<br />\n";echo "<br />\n";echo "<a name=\"a\" title=\"a\"></a>[a].....<a href=\"#A.\">text</a>\n";echo "<br />\n";echo "<br />\n";echo "<a name=\"b\" title=\"b\"></a>[b].....<a href=\"#B.\">text</a>\n";echo "<br />\n";echo "<br />\n";echo "\n";echo "<a name=\"c\" title=\"c\"></a>[c].....<a href=\"#C.\">text</a>\n";echo "<br />\n";echo "<br />\n";echo "<a name=\"d\" title=\"d\"></a>[d].....<a href=\"#D.\">text</a>\n";echo "<br />\n";echo "<br />\n";echo "<a name=\"e\" title=\"e\"></a>[e].....<a href=\"#E.\">text</a>\n";echo "<br />\n";echo "<br />\n";echo "<a name=\"f\" title=\"f\"></a>[f].....<a href=\"#F.\">text</a>\n";echo "\n";echo "<br />\n";echo "<br />\n";echo "<a name=\"g\" title=\"g\"></a>[g].....<a href=\"#G.\">text</a>\n";echo "<br />\n";echo "<br />\n";echo "<a name=\"h\" title=\"h\"></a>[h].....<a href=\"#H.\">text</a>\n";echo "<br />\n";echo "<br />\n";echo "<a name=\"i\" title=\"i\"></a>[i].....<a href=\"#I.\">text</a>\n";echo "</body>\n";echo "</html>\n";echo "";?>

I know I am a pain in the butt, but it will save all of us a ton of time is it is done.

Link to comment
Share on other sites

Yeah, honestly, if you're just going to put out a bunch of HTML, you'd be better off just putting all the files in .html format instead. It'd save you, and us, time. You only use PHP for processing. If all you're going to do is load a bunch of HTML, you'd be better just using static pages. And also, include(i believe, dont quote me on this) should only really be used for files that are on your server. using URL paths is something i try to avoid like the plague. just hit include('./menu.php'); and that should do the trick. Also, did you make sure that menu.php exists on your server?

Link to comment
Share on other sites

? Well, download an editor such as JustSomeGuy's conTEXT, save you a lot of time :)Also, yes, there is no point in converting your HTML to PHP, you will just end up with the same thing. And btw, you can have plain HTML in a .php file, just place it outside of the <?php ?> tags.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...