Can someone explain when/where to use PHP/HTML for a website?

Discussion in 'Programming' started by EndemicTruth, Aug 24, 2012.

  1. #1
    I'm trying to design a website for my business from the ground up and am completely new to webdev. I am having trouble deciding how to go about designing this website. What are the benefits of using something like Dreamweaver; and would I learn more / be able to do more if I built it from the ground up with PHP and HTML?

    I am also a bit unsure as to when to use HTML, and when to use PHP. From what I gather PHP is for like, a shopping cart, or a interactive part of a website; whereas HTML is the design / layout?


    Thanks a bunch! :D
     
    EndemicTruth, Aug 24, 2012 IP
  2. Tommy Arnold

    Tommy Arnold Active Member

    Messages:
    525
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Yes you are right, HTML is used for the main structure/layout along with css for styling. PHP is used to do SERVER SIDE calculations and to interact with a database or send emails etc. If you are just getting started HTML/CSS should be fine.
     
    Tommy Arnold, Aug 25, 2012 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    there are NONE... When used in the manner the apolists would call "properly" it is at best an overpriced bloated version of your typical notepad replacement; used how it's designed to be used with it's full functionality, you end up crapping out an bloated, slow inaccessible train wreck of a website that while cute for little personal pages, has no business being used ... for a business.

    Much akin to the idiotic approach of drawing a cutesy picture of a website in Photoshop and then actually trying to turn it into one -- it's broken methodology, broken thinking, and for the most part all boils down to sleazy shortcuts taken by those who won't take the time to do anything properly, aren't willing to take the time to learn how to do the job, or just plain want to sleaze out a flashy page as fast as possible to prey upon the ignorance of others.

    Do yourself a favor, get a flat text editor, and learn semantic HTML with zero concern for your final appearance. THEN learn to style that HTML (without saying what that appearance is in the markup) using CSS... Only at that point, should you consider moving on to PHP. The "PHP: Hypertext Preprocessor" exists to take user input, talk to server resources, and then output the result AS HTML, so until you are qualified to write good HTML, IMHO you have ZERO business learning the first thing about PHP! (unfortunately the industry disagrees, which is why ignorant twits sleaze out HTML from PHP and other languages that is worse than what people were writing for static sites at the peak of the browser wars! Once you learn some HTML/CSS, "view source" on your average turdpress website to see what I mean...)

    HTML is simple -- honestly that's the easiest part which is why it's so shocking that people screw it up so often... CSS is more difficult, mostly due to browser differences. That's going to take the longest... but between the two it's 99% of the tools needed to make a website.

    Server side languages, particularly PHP, are best thought of as glue -- the ability to make a bunch of separate bits of HTML, or to take data from a database and turn it into HTML, and then glue it together as a single page.

    Really though when it comes to making your base 'template' as HTML and CSS, if you need more than a flat text editor (Flo's notepad2, Editplus, notepad++, crimson editor, text wrangler, gEdit) and the actual browsers to test what your code will look like -- you're probably doing it all wrong.

    Anyone telling you otherwise is packing you full of manure.
     
    deathshadow, Aug 26, 2012 IP