Jump to content


Photo

PHP vs HTML


  • Please log in to reply
31 replies to this topic

Poll: PHP vs HTML

What is better

You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Vote Guests cannot vote

#1 Deaf Raiders

Deaf Raiders

    Dedicated Member

  • Members
  • PipPip
  • 168 posts

WDF Reputation

0
Neutral
  • Experience:Beginner
  • Area of Expertise:Web Designer

Posted 06 December 2008 - 07:32 PM

Which is the best PHP vs HTML?

What is the difference between them both. I know the HTML works better on SEO than php (correct me if i am wrong).

#2 Guezala

Guezala

    Not an expert, just talk a lot...

  • Privileged
  • PipPipPipPipPip
  • 1,504 posts

WDF Reputation

11
Good
  • Gender:Female
  • Location:Midlands
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 06 December 2008 - 07:43 PM

I'm not sure I can choose...since you can use them together to create dynamic pages....
HTML makes up the basic content of the page, php enables the page to 'react' to events or conditions, and adapt the HTML accordingly.
PHP is server side, HTML is browser side. You don't see the php unless you're doing it yourself...you can see the HTML.
They do completely different jobs, but work together.
For me it's like if you asked me whether I liked the chicken or the gravy best in my roast....they are best together for me.

#3 mike_1337

mike_1337

    Dedicated Member

  • Members
  • PipPip
  • 151 posts

WDF Reputation

0
Neutral
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 06 December 2008 - 08:01 PM

The question doesn't make sense. If you were going to ask the question, it would be PHP vs ASP or something like that since both are programming languages and both serve the same purpose.

You can use it to build the HTML page for example - outputting a table containing data from the database. HTML is the end result for the work done by PHP... if's elses etc..

#4 pat24

pat24

    Guru of nothing important!!

  • Privileged
  • PipPipPipPipPip
  • 2,192 posts

WDF Reputation

133
Excellent
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Nothing

Posted 06 December 2008 - 08:04 PM

I'm not sure I can choose...since you can use them together to create dynamic pages....
HTML makes up the basic content of the page, php enables the page to 'react' to events or conditions, and adapt the HTML accordingly.
PHP is server side, HTML is browser side. You don't see the php unless you're doing it yourself...you can see the HTML.
They do completely different jobs, but work together.
For me it's like if you asked me whether I liked the chicken or the gravy best in my roast....they are best together for me.


I agree, you cant compare the two as to what is best, html and php work together, amongst other server side languages.

Pat

#5 Skysurge

Skysurge

    Advanced Member

  • Members
  • PipPipPip
  • 499 posts

WDF Reputation

0
Neutral
  • Location:Canada
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 06 December 2008 - 08:10 PM

WHAT.




They are completely different things!!





NEW VOTE!

WHAT IS BETTER, PUBLIC TRANSIT OR THE MOON?


#6 Sam Christy

Sam Christy

    Advanced Member

  • Members
  • PipPipPip
  • 357 posts

WDF Reputation

0
Neutral
  • Gender:Male
  • Location:South London, England
  • Experience:Beginner
  • Area of Expertise:Designer/Coder

Posted 06 December 2008 - 08:11 PM

I don't think you can really compare them seeing as they both do different things :huh:

#7 pat24

pat24

    Guru of nothing important!!

  • Privileged
  • PipPipPipPipPip
  • 2,192 posts

WDF Reputation

133
Excellent
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Nothing

Posted 06 December 2008 - 08:22 PM

WHAT.




They are completely different things!!





NEW VOTE!

WHAT IS BETTER, PUBLIC TRANSIT OR THE MOON?


The Moon

it comes every night

Pat

#8 Meshach

Meshach

    Dev Ninja

  • Privileged
  • PipPipPipPipPip
  • 2,464 posts

WDF Reputation

3
Neutral
  • Gender:Male
  • Location:United States
  • Experience:Advanced
  • Area of Expertise:Coder

Posted 06 December 2008 - 10:37 PM

HTML = HyperText Markup Language

PHP = HyperText: Pre-Processor

#9 Seth

Seth

    Debugging the world of code one line at a time.

  • Privileged
  • PipPipPipPipPip
  • 1,268 posts

WDF Reputation

9
Neutral
  • Gender:Male
  • Location:Philadelphia-Metro, USA
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 06 December 2008 - 10:40 PM

I think PHP is more dynamic but they work so well together especially XHTML and PHP. PHP makes HTML work even better 8)

#10 Eskymo

Eskymo

    Web Guru

  • Privileged
  • PipPipPipPipPip
  • 2,438 posts

WDF Reputation

39
Excellent
  • Gender:Female
  • Location:Fife, Scotland, UK
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 06 December 2008 - 11:49 PM

I use both together so i don;t think you can do a poll on which is best - it would be better to compare PHP with ASP! PHP would win of course.

#11 MacDesign

MacDesign

    Advanced Member

  • Members
  • PipPipPip
  • 345 posts

WDF Reputation

3
Neutral
  • Gender:Male
  • Location:Manila
  • Experience:Intermediate
  • Area of Expertise:Designer

Posted 06 December 2008 - 11:54 PM

I also agree with what the other members said, PHP and HTML complement each other.

#12 Deaf Raiders

Deaf Raiders

    Dedicated Member

  • Members
  • PipPip
  • 168 posts

WDF Reputation

0
Neutral
  • Experience:Beginner
  • Area of Expertise:Web Designer

Posted 07 December 2008 - 12:19 AM

Well sorry guys am just new to this. I've seen sources from websites save as PHP and one has HTML can't really see a spot a difference between them both.

#13 aram

aram

    Forum Newcomer

  • Members
  • Pip
  • 48 posts

WDF Reputation

0
Neutral
  • Gender:Male
  • Location:London
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 07 December 2008 - 12:52 AM

Well sorry guys am just new to this. I've seen sources from websites save as PHP and one has HTML can't really see a spot a difference between them both.



.php files have php code in the original source files that are on the server. When the server fetches a page with a .php extention, it knows that before it sends it accross the net to your browser it has to process the php code and 'construct' the HTML that is generated from it. Once it has processed the php code the resulting page that is sent out is pure HTML, and would work with a .html extention, but because the URL is of the origonal file it retains the .php.

Think of PHP as a way to dynamically create html pages before you send it to people's browsers, so for example if I had a page that displayed todays date, I would have some PHP code that fetched the date and then inserted it as HTML. By the time the browser reads page (and you the source code) it knows no different, the only tell tale sign is the .php on the end of the URL.

Hope that clears it up :)

#14 mikejonesey

mikejonesey

    Advanced Member

  • Members
  • PipPipPip
  • 355 posts

WDF Reputation

0
Neutral
  • Gender:Male
  • Location:Brighton, UK
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 07 December 2008 - 01:10 AM

php that produces xhtml content :)


ps even if a page only has html content i still place it in a php file (should i ever want to add dynamic content the page location and name remain the same for the search engines :) )

#15 Zee Deveel

Zee Deveel

    Forum Newcomer

  • Members
  • Pip
  • 10 posts

WDF Reputation

0
Neutral
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 07 December 2008 - 01:57 AM

PHP is winning 3 - 0! Go PHP!

#16 Nick @ Kerplunc

Nick @ Kerplunc

    Forum Newcomer

  • Members
  • Pip
  • 12 posts

WDF Reputation

0
Neutral
  • Location:Brighton
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 07 December 2008 - 10:32 AM

Basically, PHP generates the content for a page, and this is drawn into html tags and css, which make it look like something more than just a page of text.

PHP is backend (content-focussed: what you "read" on a website [assuming it's powered by php]), HTML is front end (visual, basically what you "see" on a website)

#17 Meshach

Meshach

    Dev Ninja

  • Privileged
  • PipPipPipPipPip
  • 2,464 posts

WDF Reputation

3
Neutral
  • Gender:Male
  • Location:United States
  • Experience:Advanced
  • Area of Expertise:Coder

Posted 07 December 2008 - 09:08 PM

I use both together so i don;t think you can do a poll on which is best - it would be better to compare PHP with ASP! PHP would win of course.


Agreed.

#18 Skysurge

Skysurge

    Advanced Member

  • Members
  • PipPipPip
  • 499 posts

WDF Reputation

0
Neutral
  • Location:Canada
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 07 December 2008 - 09:11 PM

The Moon

it comes every night

Pat



The bus comes every 30 minutes... Far superior.

#19 oggyb

oggyb

    Forum Newcomer

  • Members
  • Pip
  • 34 posts

WDF Reputation

0
Neutral
  • Experience:Intermediate
  • Area of Expertise:I'm Learning

Posted 10 December 2008 - 04:20 PM

Does the server only know that it needs to pre-process the file by the .php extension, or will it parse code embedded in a file that ends .html?

In terms of user experience I think it's a little more comforting to see "index.html" in the browser than "index.php"

#20 Jem

Jem

    Advanced Member

  • Members
  • PipPipPip
  • 288 posts

WDF Reputation

1
Neutral
  • Gender:Female
  • Location:Telford, Shrops.
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 10 December 2008 - 04:23 PM

Does the server only know that it needs to pre-process the file by the .php extension, or will it parse code embedded in a file that ends .html?

You can make Apache parse HTML files as PHP with this line (IIRC):

AddHandler application/x-httpd-php .html

In terms of user experience I think it's a little more comforting to see "index.html" in the browser than "index.php"

I've been using PHP for about 4 years and I don't think anyone has ever complained about .php over .html - most people haven't a clue what it means.

If you want real user-friendliness, in theory you should just remove extensions altogether (in the URL, obviously not on the file).

#21 cybergord

cybergord

    Forum Newcomer

  • Members
  • Pip
  • 3 posts

WDF Reputation

0
Neutral
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 10 December 2008 - 05:40 PM

Which is the best PHP vs HTML?

What is the difference between them both. I know the HTML works better on SEO than php (correct me if i am wrong).



I always disguise my php pages using mod rewrite in htaccess, so a page like /index.php?page=home
reads /home.html. I'm not even sure how this affects SEO, but it keeps my pages inline with most of the web and what most are familiar with. Coding links is tidier too.

#22 steveswebdesign

steveswebdesign

    Forum Newcomer

  • Members
  • Pip
  • 21 posts

WDF Reputation

0
Neutral
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 10 December 2008 - 05:41 PM

u can't compare them. Trying to compare php and html is like comparing a car to a GPS. They do completely different jobs, but need each other to build something usefull. Php isn't needed but it adds interactivity and dynamic content and is very much wanted now-a-days. Just learn html and how to create static webpages then learn how to integrate php and databases (MYSQL).

#23 sunwukung

sunwukung

    Expert

  • Privileged
  • PipPipPipPipPip
  • 1,150 posts

WDF Reputation

57
Excellent
  • Gender:Male
  • Location:Bristol
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 10 December 2008 - 06:40 PM

Neither, I prefer chocolate.

#24 EvSouL

EvSouL

    Advanced Member

  • Members
  • PipPipPip
  • 367 posts

WDF Reputation

1
Neutral
  • Gender:Male
  • Location:San Francisco and Los Angeles
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 14 December 2008 - 03:59 AM

You need to think of it like this...

php generally is the function of how an engine works in a car.
html is the nuts n bolts that put the car together.
css is how the car looks.

:)

this means.. php is typically function.. ie login, user signup, search functions, etc etc.
html is the structure of how the page will be composed.
css is the positioning, design, colors, everything that truly affects how the page is looking.


so.. and excuse me i tend to over explain.

but php is how we are able to post our threads. html/css is why we see all the pretty colors/designs on this page.

hope that helps.

#25 Xr4t3D85

Xr4t3D85

    Dedicated Member

  • Members
  • PipPip
  • 112 posts

WDF Reputation

0
Neutral
  • Gender:Male
  • Location:TX
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 14 December 2008 - 07:03 PM

This isnt really a poll, the pole should be PHP vs ASP. If that were the case, I would vote PHP!

On another note, html is what php would put out. Not to mention about SEO, that also doesnt make sense. If you create something in PHP to output certain tags or other things which would be in an html tag format. Therefore SEO is going to read the HTML tag.

Thing this poll should be reviewed, and resubmitted!

POLL:

What do you all think?

PHP vs ASP?

#26 craftedpixelz

craftedpixelz

    Privileged

  • Privileged
  • PipPipPipPip
  • 644 posts

WDF Reputation

5
Neutral
  • Gender:Male
  • Location:Manchester, UK
  • Experience:Web Guru
  • Area of Expertise:Web Designer

Posted 14 December 2008 - 09:37 PM

Upon reading the title of the thread, I was about to post pretty much what everyone else has just said. Oh well, i'll say it anyway. PHP and HTML are too totally different languages. HTML is responsible for creating the structure of a page and PHP is used to control dynamic actions of a page. To put it simply, you can't structure pages entirely in PHP and you can't create dynamic pages entirely with HTML. They're both too different to attempt to compare and decide which is 'better'.

What do you all think?

PHP vs ASP?


PHP by far. I absolutely HATE ASP.

#27 Raoul de Boer

Raoul de Boer

    Advanced Member

  • Members
  • PipPipPip
  • 290 posts

WDF Reputation

0
Neutral
  • Gender:Male
  • Location:Holland
  • Experience:Intermediate
  • Area of Expertise:Web Designer

Posted 15 December 2008 - 09:42 AM

Php and HTML are totally different.

I prefer PHP because more options are possible with it.

#28 traxor

traxor

    Web Guru

  • Privileged
  • PipPipPipPipPip
  • 1,978 posts

WDF Reputation

107
Excellent
  • Gender:Male
  • Location:United Kingdom
  • Experience:Web Guru
  • Area of Expertise:Web Designer

Posted 15 December 2008 - 11:04 AM

I don't really see them as something that you can define between, you use them in unison to produce a dynamic website, however I've chosen XHTML because XHTML/CSS will always look good, whereas PHP needs XHTML to look good, if you see what I mean.

#29 koko13

koko13

    Forum Newcomer

  • Members
  • Pip
  • 96 posts

WDF Reputation

0
Neutral
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 30 December 2008 - 07:54 AM

PHP and HTML can work together, and don't worry about SEO if you know the way how to use PHP script inside HTML tags.
^ ^

#30 dangreaves92

dangreaves92

    Advanced Member

  • Members
  • PipPipPip
  • 376 posts

WDF Reputation

2
Neutral
  • Gender:Male
  • Location:Essex, UK
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 01 January 2009 - 08:46 PM

This page has quite a good explanation on the difference between the two.
(although alot of it has been repeated about 600 times in this single thread)

#31 Meshach

Meshach

    Dev Ninja

  • Privileged
  • PipPipPipPipPip
  • 2,464 posts

WDF Reputation

3
Neutral
  • Gender:Male
  • Location:United States
  • Experience:Advanced
  • Area of Expertise:Coder

Posted 01 January 2009 - 08:58 PM

This topic should be deleted the person who started it is a spammer.

#32 Xr4t3D85

Xr4t3D85

    Dedicated Member

  • Members
  • PipPip
  • 112 posts

WDF Reputation

0
Neutral
  • Gender:Male
  • Location:TX
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 03 January 2009 - 06:29 PM

I know we have already had this discussion before! This cannot be compared, and the person who person who put this on here should be deleted.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users