Page 1 of 1
HTML vs. PHP
Posted: Thu Feb 23, 2006 12:58 pm
by gumphfy
I sure hope this is the right forum to post this in..but, oh well.
I'm about to write a report for my IT class, about the dynamacy of PHP as opposed to HTML. My work is really cut out for me...
But what I really want to ask you all, is what would be the most interesting aspects of PHP to include, aside from the adnimitrating point of view (like incorporate the site with a mysql DB)?
What I'm going to do as a project for the report, is creating two identically websites, one written entirely in HTML, and one in PHP (including the sql abilities).
What do you think I should include?
Things I want to include myself:
- A switch function
selection from a database
insertion into a database
The mandatory if/elseif statements
inclusion
Arries and variables
These are just some of my own apparent ideas, as I only started to work on the report today.
But I'm all up for new ideas, suggestions, comments and guidance.
Thanks in advance!
Posted: Thu Feb 23, 2006 1:51 pm
by Charles256
do you mean how dynamic html is compared to php ? if so..is that really even a battle? one isn't dynamic, the other is...game over?

Posted: Thu Feb 23, 2006 2:00 pm
by Chris Corbyn
PHP is a fully-pledged programming language in it's current state (some may argue not). HTML is just markup. There's no logic in HTML and thus you can't do anything dynamic with it by itself... it's static.
If we get into JavaScript however, well, now we can add some dynamic content to our web pages... this extends on the HTML much like PHP does... if we're talking about Javascript in HTML pages, well, we cn then speak of XMLHttp and the interface between JavaScript and PHP when working with AJAX
Not sure talking about switch statements and if/else (these are called control structures) will really be a big selling point since these exist in all (modern) programming languages. Inclusion and interfacing with MySQL is certainly something that makes PHP worth using in websites though.
If you're using PHP you're still using HTML (probably) since that's the output you'll get it to produce... so basically you've added a lot more to the possibilities of what your web pages can do!

Posted: Fri Feb 24, 2006 7:27 am
by gumphfy
No, you're right, it's not a fair battle, and I did that on purpose so it would be clear how superior PHP really is. I'm not about to discuss the possibilities in HTML with or without JS/AJAX, as I only want to use the HTML as a counterpart of how inefficient a website really can be, when administrating it.
I only want to use the PHP to illustrate the possibilities of web programing languages today, and in the future.
So I really want to bring out the best in PHP, while keeping it all very simple.
I want it all the be understandable by people to whom PHP is unknown turf.
Even though some may say that HTML and PHP are incomparable, I still want to use those two, and only those two (no asp, js, ajax, xml etc.)
It is solely to prove the strength of PHP.
That's why I wanted some input from you guys, of what might be the most interesting aspects of PHP to include.
Posted: Fri Feb 24, 2006 8:21 am
by d3ad1ysp0rk
For a presenation idea, I'd show them the steps required to change say, the about page's body with both a control panel, and with straight html.
Control:
- Login
- Navigate to about page editor
- Change page info
Static HTML:
- Download FTP client
- Connect to server
- Download file
- Open file in editor
- Change line and save
- Upload file to server
Also, note to them how you were required to shift through all the markup and layout information just to edit the content. Explain to them how hard it would be for a user with no web experience (HTML) to edit the page.