HTML vs PHP: What is the core difference?

Any problem with HTML can be discussed here.
Post Reply
uz
Posts: 140
Joined: Sat Dec 24, 2005 5:32 pm

HTML vs PHP: What is the core difference?

Post by uz »

Hey guys
pls explain what are the core differences between these two langs
i know php is scripting but what is the functionality differences?


Lixas
Posts: 750
Joined: Wed Feb 16, 2005 4:21 pm

Post by Lixas »

maybe i will tell you some example what you can with php and what you can not do with html: with php you can...
  • create loops for some kind cicles
  • manipulate digits, strings, arrays, pointers
  • work with databases like mysql or postegree
  • create images on the fly
  • create users authentication system
  • create all kind of files on the fly (xml, txt, jpg, jpeg, png........ and so on)
  • manipulate files (copy, delete, rename) on server
  • query external sites for information and show in you own page
All this stuff is not possible in html. And one more thing: mostly php parsing results is html page, so i guess sometimes for noobies in web development it dificult to catch a difference between html and php
Image
Kaky
Posts: 274
Joined: Tue Apr 18, 2006 7:43 pm

Post by Kaky »

Or as i know it html is a static page with no user interaction put a php site is dinamic with user<--->server interraction.
Image

A funny picture -------> me , myself and i (too much for this world)
ddarude
Posts: 119
Joined: Fri May 12, 2006 1:05 pm

Post by ddarude »

Kaky wrote:Or as i know it html is a static page with no user interaction put a php site is dinamic with user<--->server interraction.
PHP makes our job easier :) Also ... less disk space :P
http://www.stonersdent.com
63.208.142.108:27015
rwshthn
Posts: 500
Joined: Tue Sep 26, 2006 1:39 am
Contact:

its

Post by rwshthn »

create loops for some kind cicles

manipulate digits, strings, arrays, pointers

work with databases like mysql or postegree

create images on the fly

create users authentication system

create all kind of files on the fly (xml, txt, jpg, jpeg, png........ and so on)

manipulate files (copy, delete, rename) on server

query external sites for information and show in you own page
and php program good than front page
hossamkiwan
Posts: 344
Joined: Tue Nov 07, 2006 8:42 pm

Post by hossamkiwan »

One more point

PHP near to C langauge
Surreal
Posts: 133
Joined: Sat Nov 11, 2006 5:03 am

Post by Surreal »

PHP is a server side language, which is actually a programming language. HTML is a mark up, not actually a language, and is also client based.
Paolo1993
Posts: 195
Joined: Tue Jul 18, 2006 11:26 pm

Post by Paolo1993 »

as they say php is server sided while html are just pages
Image
vinter
Posts: 27
Joined: Fri Dec 22, 2006 5:08 pm

Post by vinter »

HTML is a language that is interpreted by the internet browsers. It tells the browser what to show and how to show it on a web page. It runs on the client's computer. However, it lacks certain features that are implemented in client side scripting languages like javascript.

PHP is a language that runs on the server and creates HTML pages. It is a proper programming language and contains all the constructs a programming language should have, including loops, conditional statements et al.

Thus when a client requests a PHP page from a server, following is the sequence of events :-
1. The request reaches the server.
2. The server runs the PHP script on itself.
3. The PHP script generates an HTML page.
4. The server sends back this HTML page to the client.
5. The client's browser interprets this HTML.

To put it in a nutshell, PHP and HTML are two completely different entities, the only apparent similarity might be to do with the fact that they are both related to web development.
annamarie
Posts: 66
Joined: Tue Dec 26, 2006 2:18 pm

Post by annamarie »

simple answer is
html : static web
php : dynamic web
Post Reply