HTML / CSS site upgrade

  • tommyauvergne
  • Newbie
  • Newbie
  • User avatar
  • Posts: 12
  • Loc: France

Post 3+ Months Ago

Hi to all,

New to the forum. I've been designing sites, doing site maintenance for several years now, although only on a part time basis as it's not my profession. (Although I'd like it to be).
I've been using HTML, CSS and Java all this time and feel confident in using these languages.
I've been reading a lot of the threads here and have found a number of members with lots of experience in programming languages. Also, if I look for jobs in this domain, most ask for .php and mysql knowledge.
I'd like to ask for some advice. I'm interested in learning php, etc so I can keep up with any advancements in the industry. But what is the benefit to the end user in updating sites. Say, for example, I have a site that loads quickly, has picture galleries and does all the things I want and need written in HTML, CSS and Java. If I eventually write the same site (layout) in .php, how will this benefit me and the viewer.
Is php and any newer technology that different to the basics? Are they going to overwhelm the industry and make my humble knowledge of HTML, CSS and Java unusable? Or am I panicking and being a pessimist?

All advice welcome,

Cheers,

Tommy.
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6810
  • Loc: Martinsburg, WV

Post 3+ Months Ago

PHP is not a replacement of HTML and CSS. PHP is a programming language. HTML and CSS is used for layout and design of websites. PHP, HTML and CSS can all work together peacefully.

Lets say for example you need to add a new button to your navigation. Currently without PHP you would need to update every page with the new button for your navigation. Using PHP you can create an HTML document with your navigation code only and use PHP to display it. This way you only need to update your navigation code and it will be changed across your entire website.

For example. You have a website that uses the following code for your navigation and you need to add a new link to a new page. You would have to update that code on every page of your site.
Code: [ Select ]
<div id=nav">
   <ul>
     <li><a href="index.php">Home</a></li>
     <li><a href="about.php">About Us</a></li>
     <li><a href="contact.php">Contact Us</a></li>
     <li><a href="sitemap.php">Sitemap</a></li>
   </ul>
</div>
  1. <div id=nav">
  2.    <ul>
  3.      <li><a href="index.php">Home</a></li>
  4.      <li><a href="about.php">About Us</a></li>
  5.      <li><a href="contact.php">Contact Us</a></li>
  6.      <li><a href="sitemap.php">Sitemap</a></li>
  7.    </ul>
  8. </div>

Now if you were using PHP you could take that code and put in a file call nav.html and use this piece of PHP code to display it.
Code: [ Select ]
<?php include("nav.html"); ?>

That one little piece of code would go on every page in your website where you want your navigation to appear. Now when you want to make a change to your navigation all you need to do is update nav.html

I hope this makes sense. There are more uses for PHP but that one stands out.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

grinch2171 wrote:
PHP is not a replacement of HTML and CSS. PHP is a programming language. HTML and CSS is used for layout and design of websites. PHP, HTML and CSS can all work together peacefully.

Lets say for example you need to add a new button to your navigation. Currently without PHP you would need to update every page with the new button for your navigation. Using PHP you can create an HTML document with your navigation code only and use PHP to display it. This way you only need to update your navigation code and it will be changed across your entire website.

For example. You have a website that uses the following code for your navigation and you need to add a new link to a new page. You would have to update that code on every page of your site.
Code: [ Select ]
<div id=nav">
   <ul>
     <li><a href="index.php">Home</a></li>
     <li><a href="about.php">About Us</a></li>
     <li><a href="contact.php">Contact Us</a></li>
     <li><a href="sitemap.php">Sitemap</a></li>
   </ul>
</div>
  1. <div id=nav">
  2.    <ul>
  3.      <li><a href="index.php">Home</a></li>
  4.      <li><a href="about.php">About Us</a></li>
  5.      <li><a href="contact.php">Contact Us</a></li>
  6.      <li><a href="sitemap.php">Sitemap</a></li>
  7.    </ul>
  8. </div>

Now if you were using PHP you could take that code and put in a file call nav.html and use this piece of PHP code to display it.
Code: [ Select ]
<?php include("nav.html"); ?>

That one little piece of code would go on every page in your website where you want your navigation to appear. Now when you want to make a change to your navigation all you need to do is update nav.html

I hope this makes sense. There are more uses for PHP but that one stands out.


Dang! All that time I've being wondering how to make easily editable pages and forgeting about php include statement. Thanks for reminding.
  • tommyauvergne
  • Newbie
  • Newbie
  • User avatar
  • Posts: 12
  • Loc: France

Post 3+ Months Ago

Thanks for the explanation. Now it makes more sense.
For some reason it just wouldn't sink in. At least I'm now happily on the road to enlightenment, and not just stumbling across bits of info on the www.

I think I've got a fair bit of homework to do.

:roll:

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 32 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.