meloncrack Posted October 6, 2008 Share Posted October 6, 2008 Hi I'm learning about website design and I am studying it by applying my knowledge to it. this is my website that I have. www.pokerhungry.com as you can see on the left hand side, there are a number of links * Home * Introduction * Advice & Mistakes * Pre-Flop Play * Holdings at Flop Play * On the Turn * On the River * Special Moves * Odds * Glossary To be honest all of these are separate pages as well. So for Introduction I will have * Home * Introduction * Advice & Mistakes * Pre-Flop Play * Holdings at Flop Play * On the Turn * On the River * Special Moves * Odds * Glossary And for Advice & Mistakes page I would have * Home * Introduction * Advice & Mistakes * Pre-Flop Play * Holdings at Flop Play * On the Turn * On the River * Special Moves * Odds * Glossary So pretty much all of these are .html links. I'm pretty much a noobie. Someone told me I can make each link a .php for example (introduction.php, advice&mistakes.php) and pretty much I only have to change ONE FILE and it will update for all pages. Can someone help me? I heard this was called server side includes, but I called my hosting www.1and1.com hosting and they said they cannot allow us to use server side includes because they don't have that kind of functionality. Can any professional php people help me figure this out My AIM is : meloncracked YAHOO is: meloncrack MSN is: [email protected] i love the person who can help me. thanks. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/ Share on other sites More sharing options...
zsedc Posted October 6, 2008 Share Posted October 6, 2008 Hi I think you should really read basic tutorial of PHP. Try this http://www.tizag.com/phpT/ . You should pick up basic php skills after a couple of days and than you will be able to do things you want. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/#findComment-658569 Share on other sites More sharing options...
genericnumber1 Posted October 6, 2008 Share Posted October 6, 2008 when your host says they don't have server-side includes, they're probably referring to SSI, which is a rarely used technology. PHP includes will still work (assuming they have php?). http://www.hudzilla.org/phpwiki/index.php?title=Including_other_files Of course, you need some basic php knowledge to understand how to use them, but that website has a good introduction if you go back a few chapters/pages. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/#findComment-658571 Share on other sites More sharing options...
Brian W Posted October 6, 2008 Share Posted October 6, 2008 First of all, your going to need to learn some PHP for this. Secondly, I use 1and1 and yes you can use include()... they do not prevent you from doing this as it is a VERY commonly used PHP function. Another consideration, you must be using one of 1and1's Linux packages (not MS) to use PHP. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/#findComment-658572 Share on other sites More sharing options...
xtopolis Posted October 6, 2008 Share Posted October 6, 2008 FYI, SSI != include(); http://en.wikipedia.org/wiki/Server_Side_Includes The op will not need "Server Side Includes", php will be more than sufficient. Also, I have 1and1 as well, and by default they offer you linux flavored servers, you have to find windows, if you'd want it. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/#findComment-658578 Share on other sites More sharing options...
meloncrack Posted October 7, 2008 Author Share Posted October 7, 2008 I hate it when guys claim to act intelligent but they don't really help. If i didn't no basic php why would I be here. I went to the w3schools website and read the whole php tutorial. And on that, they don't teach you anything about including. Thanks to the young guy genericnumber1, he really knows whats going on. Thanks generic, to the other two I'm pretty disappointed, you just are out there to piss people off. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/#findComment-658597 Share on other sites More sharing options...
BillyBoB Posted October 7, 2008 Share Posted October 7, 2008 Actually include() is a very basic php command. If you are looking to learn php you need to look in every resource before coming to a help forum. A couple of places to look: First and foremost- http://google.com http://php.net There are many more but google and php.net are the best.... Afterthought: w3c has nothing to do with php standards. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/#findComment-658603 Share on other sites More sharing options...
xtopolis Posted October 7, 2008 Share Posted October 7, 2008 I hate it when guys claim to act intelligent but they don't really help. If i didn't no basic php...I lol'd. Nice second sentence. It's fun trying to run before you can walk, I do it all the time. But I always try to go back and walk so I can figure out how to run better. You can have one file named menu.php and on all your other pages, do an include 'menu.php'; , and they will all be referencing the same file. That way you can make a change to menu.php [add/remove/update a link] and all pages will reflect it. PS> I wouldn't go naming pages add&mistakes.php, & symbols aren't the friendliest for urls. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/#findComment-658608 Share on other sites More sharing options...
dabigchz Posted October 7, 2008 Share Posted October 7, 2008 Just to add to that, make sure all the pages you use the include on end with a .php extension. Also be sure to encase the include in <?php ?>. Link to comment https://forums.phpfreaks.com/topic/127319-how-do-you-make-a-php-menu-so-i-only-have-to-update-one-file/#findComment-658615 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.