The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> Web Design Help
|
PHP vs. HTML?
Discuss PHP vs. HTML? in the Web Design Help forum on Dev Shed. PHP vs. HTML? Web Design Help forum discussing topics such as video editing, audio editing, animation, etc. This is also the place to get recommendations on preferred web authoring tools.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 9th, 2013, 08:30 AM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 3
Time spent in forums: 17 m 35 sec
Reputation Power: 0
|
|
|
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, 09:23 AM
|
 |
Lost in code
|
|
|
|
|
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, 03:56 PM
|
|
Contributing User
|
|
Join Date: Dec 2012
Location: Ithaca
Posts: 64
Time spent in forums: 13 h 7 m 48 sec
Reputation Power: 1
|
|
|
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, 08:07 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 2
Time spent in forums: 1 h 51 m 26 sec
Reputation Power: 0
|
|
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.
If you're just getting started I'd really recommend concentrating on html and css first, then deciding if you want to go down the javascript or php route. There's a mountain of free resources out there to learn from:
htmldog[dot]com[slash]guides[slash]htmlbeginner[slash]
developer[dot]mozilla[dot]org[slash]en-US[slash]learn
Codecademy have recently started releasing lessons for a new PHP course: codecademy[dot]com/tracks/php
Have fun! 
|

March 13th, 2013, 10:29 AM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 3
Time spent in forums: 17 m 35 sec
Reputation Power: 0
|
|
|
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, 12:58 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 2
Time spent in forums: 1 h 51 m 26 sec
Reputation Power: 0
|
|
For a drop-down navigation bar you want to be looking at JavaScript and jQuery more than PHP. There are thousands of tutorials out there for JQuery dropdown navigation so just google around and you should be able to find something that matches your skill level - it's difficult to recommend one when there's so many!
[www].noupe.com/jquery/excellent-jquery-navigation-menu-tutorials.html
css-tricks.com/simple-jquery-dropdowns/
smashinghub.com/simple-jquery-drop-down-menu-tutorial.htm
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:
vanillaforums.org/
[www].yabbforum.com/
[www].simplemachines.org/
[www].phpbb.com/
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.
Learning HTML, CSS, JavaScript/JQuery and PHP would be more than enough to spend the rest of your life making websites, but some people might decide to specialize in just one of those.
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, 05:23 AM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 1
Time spent in forums: 34 m 28 sec
Reputation Power: 0
|
|
|
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, 04:43 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 16
Time spent in forums: 2 h 48 m 23 sec
Reputation Power: 0
|
|
|
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, 05:23 AM
|
|
Registered User
|
|
Join Date: Apr 2013
Posts: 12
Time spent in forums: 1 h 31 m 14 sec
Warnings Level: 5
Reputation Power: 0
|
|
|
In PHP,you can put HTML codes.
In HTML,you can't put a PHP code.
|

April 18th, 2013, 10:04 PM
|
|
Registered User
|
|
Join Date: Apr 2013
Posts: 17
Time spent in forums: 4 h 27 m 8 sec
Reputation Power: 0
|
|
|
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.
Satch as:
<h1>hello world</h1>
<!--html code-->
<?php
//php code
$a=2+2;
echo "2+2=".$a;
?>
|

April 19th, 2013, 09:47 PM
|
 |
|
|
Join Date: Jan 2004
Location: New Springfield, OH
|
|
|
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, 06:33 AM
|
|
Registered User
|
|
Join Date: Mar 2013
Location: usa
Posts: 4
Time spent in forums: 1 h 40 m 13 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by brandan 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.
Satch as:
<h1>hello world</h1>
<!--html code-->
<?php
//php code
$a=2+2;
echo "2+2=".$a;
?> |
very good work
thanks alot
|

April 25th, 2013, 05:32 AM
|
|
Contributing User
|
|
Join Date: Dec 2012
Posts: 26
Time spent in forums: 5 h 38 m 6 sec
Warnings Level: 5
Reputation Power: 0
|
|
|
Html and Php both are same.
I thinks that are not need to compare
|

April 26th, 2013, 07:37 AM
|
|
Permanently Banned
|
|
Join Date: Apr 2013
Location: Chennai
Posts: 7
Time spent in forums: 1 h 23 m 4 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
|
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|