Jump to content

Website Growing, Adding Links And The Next Step.


Palmer

Recommended Posts

I'm not sure exactly where to post this topic but if it is in the wrong place, please forgive me. This is a basic question and HTML is where most of us start so I thought this was the appropriate place.OK, you've created a website with just a few pages. But, over time your website grows and you add links to those new pages. You continue to add info to your site and you now have to edit every page with the new links to those pages then reload all those pages back on to your server. Instead of doing this, the hard way, what is the next logical step in terms of coding that will allow you to use a tag be it, CSS or .php, etc. that would allow you to just build a page link file and have each webpage just load that link file for your additional web pages? You would only have to edit this page link file as your website grows. I am experiencing 'this' right now and it's really becoming a chore. What's my next step to learn how to do this?Thanks

Link to comment
Share on other sites

Funny, I just posted a javascript solution to that problem here: http://w3schools.invisionzone.com/index.ph...st&p=126108But the best, most natural solution is to use PHP include files. The technique is ridiculously simple, even if you don't know PHP. But first you need to have PHP enabled on your server. (You can't experiment with this on your desktop; it must be on the server.)If you're not sure, the simplest method is to create a file called test.php . Inside the file, have the following code, looking exactly like this. I suggest typing it by hand, to ensure that no goofy end-of-line-characters mess up the document, which occasionally happens when you copy-and-paste.

<?php   phpinfo();?>

Put the file on your server, and then call it from your browser. If PHP is enabled, you should get a HUGE table of information. Ignore it. All you needed to know is that it works. If you get a blank page, do a View Source. If you see your PHP code there, that means PHP is NOT enabled. Check out your control panel and try to enable it. Or you may need to contact your sys-admin. (If view source shows a blank page, then you probably made a typing mistake.)When PHP is working, write back here and I or someone will explain the technique.

Link to comment
Share on other sites

Funny, I just posted a javascript solution to that problem here: http://w3schools.invisionzone.com/index.ph...st&p=126108But the best, most natural solution is to use PHP include files. The technique is ridiculously simple, even if you don't know PHP. But first you need to have PHP enabled on your server. (You can't experiment with this on your desktop; it must be on the server.)If you're not sure, the simplest method is to create a file called test.php . Inside the file, have the following code, looking exactly like this. I suggest typing it by hand, to ensure that no goofy end-of-line-characters mess up the document, which occasionally happens when you copy-and-paste.
<?php   phpinfo();?>

Put the file on your server, and then call it from your browser. If PHP is enabled, you should get a HUGE table of information. Ignore it. All you needed to know is that it works. If you get a blank page, do a View Source. If you see your PHP code there, that means PHP is NOT enabled. Check out your control panel and try to enable it. Or you may need to contact your sys-admin. (If view source shows a blank page, then you probably made a typing mistake.)When PHP is working, write back here and I or someone will explain the technique.

Thanks a million for the help!!! I use GoDaddy and it looks like they support php so I'll get on this and figure out as much as I can first and then get back here.Thanks again!
Link to comment
Share on other sites

I'm not sure exactly where to post this topic but if it is in the wrong place, please forgive me. This is a basic question and HTML is where most of us start so I thought this was the appropriate place.OK, you've created a website with just a few pages. But, over time your website grows and you add links to those new pages. You continue to add info to your site and you now have to edit every page with the new links to those pages then reload all those pages back on to your server. Instead of doing this, the hard way, what is the next logical step in terms of coding that will allow you to use a tag be it, CSS or .php, etc. that would allow you to just build a page link file and have each webpage just load that link file for your additional web pages? You would only have to edit this page link file as your website grows. I am experiencing 'this' right now and it's really becoming a chore. What's my next step to learn how to do this?Thanks
Use a simple PHP (DD explained how to test to see if it is working on your site) include. Then update that one page with new links, whatever. Every page it is included on will get the updated info next time they visit or refresh the screen.Need help with the syntax?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...