March 9th, 2013, 09:30 AM
PHP vs. HTML?
So im lost in the difference between php and html. I know html is client-side and php is server-side but beyond that i have no clue. Can anyone send me examples of sites using html, php, and both html and php combined? I think that would really help.
March 9th, 2013, 10:23 AM
In the context of a website, HTML is the data that PHP outputs when it finishes running. HTML defines the structure and, to some degree, the appearance of a web page. If you're learning to build web sites, you need to learn HTML first.
Generally speaking, any site that's big enough to receive more than a handful of visitors per month isn't going to be built with only HTML. You might find static HTML sites for small local businesses, but any site that generates revenue online is not using only HTML.
You won't find any sites that are built with only PHP, because PHP by itself is not capable of rendering a web page without using HTML. You will find web services that use PHP + some output format other than HTML, like XML or JSON, but those are designed strictly to be read by other computer programs, not by humans.
In most cases you cannot tell for sure whether a given site is using PHP or not. Even if the URL ends in .php, that doesn't necessarily mean the site is using PHP (although it probably is).
These forums use PHP + HTML.
March 9th, 2013, 04:56 PM
HTML is a markup language that displays the text, image and anything else you want to the browser. PHP is a programming language, it usually handles business logic with conditionals, loops, arrays and objects. You can use HTML inside PHP's echo or print statement, but to use PHP in a HTML file can be tricky. Anyway just like the last poster said, its better off for newbies to learn HTML before going to PHP.
March 10th, 2013, 09:07 PM
PHP really comes in useful when you're working with a database. For example, you can store all of your user accounts in a database and when a member enters the correct username and password your PHP program/script will fetch the relevant user details from the database and display them in the user's browser.
With html it's only really possible for everyone to see the same page, the page won't look different or display different information depending who's looking at it, everyone pretty much gets the same.
Of course everything's always changing and it's entirely possible to do a lot of advanced stuff just using html5 now but I really don't know much about that at all.
Codecademy have recently started releasing lessons for a new PHP course: codecademy[dot]com/tracks/php
March 13th, 2013, 11:29 AM
Well I registered a game development company website. I plan on having a home page, a media page (click on the link, a drop-down bar lets you choose either video, screenshots, or concept art), a projects page, and forums to start off. And I'd like to code it all myself. Would PHP allow the drop-down bar? And would I be able to code the forums using PHP?
March 13th, 2013, 01:58 PM
The forums could definitely be coded in PHP but this would be a MASSIVE task. A lot of people, myself included, would probably just choose to use one of the many free forum software packages that are currently available:
You should definitely try and learn as much as you can, just don't get disheartened when you see how many different scripting and programming languages are used on the web and how long it would take to learn enough to be able to do everything you wanted from scratch. You could probably make a simple html and css website today but coding even the simplest of php forums for it would be a huge step forward.
It's reasons like this that wordpress is so popular and so many forums look kinda similar. Knowing enough php to create your own forum would be great, it's just that not knowing it doesn't have to stop you from trying some of your ideas out in the meantime.
Have fun and enjoy life!
March 26th, 2013, 06:23 AM
Regarding PHP vs. HTML
Some of the difference of PHP Vs HTML:
1. PHP is similar to HTML. Because PHP having both HTML and PHP code.
2. HTML is a Tag language but PHP is a scripting language.
3. The output of PHP is mostly in HTML code. Because the web browser only sends HTML codes and PHP code always in background.
4. Actually web page takes two numbers, add it and present to user which easily done by PHP but which is not possible in HTML.
March 28th, 2013, 05:43 AM
In addition, php creates a dynamic pages in which you can implement call to action, respond according to user response and many more...
html pages are just static pages which appears same to everyone who access them.
April 17th, 2013, 06:23 AM
In PHP,you can put HTML codes.
In HTML,you can't put a PHP code.
April 18th, 2013, 11:04 PM
First of all what is php?
A: php is a programming language used used on servers and only on servers.
How does it work?
A: when your computer ask for a file on a server the server responds with the file that could be php html, jpg, png, or anything for that matter. A php file is like a html file but does show the php code unless it displays something.
April 19th, 2013, 10:47 PM
Webpages are sent to the client browser as HTML (a textual representation of a website). PHP is a server-side method of dynamically creating that HTML.
April 22nd, 2013, 07:33 AM
very good work
Originally Posted by brandan
April 25th, 2013, 06:32 AM
Html and Php both are same.
I thinks that are not need to compare
April 26th, 2013, 08:37 AM
PHP Vs HTML ?
PHP is an server side.HTML is an Browser side.HTML to makes up the basic content of the page,But php enables the page to 'react' with conditions, and adapt the HTML accordingly.