Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRaphael Reiter
6,820 PointsWhy php?
Hey guys,
I'm sorry but I still don't understand what the point of using php is? and i don't get what it actually does? what's the difference than just using normal html and css coding?
thanks... sorry if it's a dumb question..
5 Answers
Codin - Codesmite
8,600 PointsPHP is a hypertext preproccesser.
It is mainly used for backend server side scripting on a web server, this means the users device does not need to download or process the PHP script as it done for it by the server that hosts the file (meaning there is no need for the user to download additional software to run the scripts like frontend scripting languages such as Javascript and Flash which require javascript and flash installed on the users device.
For example you could write your whole website in PHP and the user wouldn't even know because you served dynamic HTML content from the PHP scripts to the user, they will only see the HTML results of the PHP scripts and not the scripts themselves as the server dealt with them rather then the users device.
PHP has unlimited uses, here are some common examples;
- Form Data Proccessing
- Database Queries
- Dynamic Content Generation
- App Scripting
- Desktop Software Development (Not common but very possible).
- Server Side Scripting
- Command Line Scripting
- Text Proccessing
- and much more
The best thing about PHP is it is fairly easy to learn for newcomers.. if you really want to know what PHP is and how it works jump into the PHP development track here on Team Treehouse, as long as you have the basics of HTML, CSS and webdesign under wraps it shouldn't be difficult to get up to speed fast.
Roy Penrod
19,810 PointsPHP is a server-side scripting language. That's a fancy way of saying it does some stuff when you call it on the server and then returns HTML and CSS to the browser.
The main use for PHP is to connect to a database. You store information in the database, access it with PHP, and send it back to the browser as HTML and CSS.
WordPress is one of the most popular content management systems used today. It lets you use a nice user interface to add content to your website, so you don't have to understand how to code in HTML and CSS. It's written in PHP and connects to a database, where it stores your content.
PHP is very flexible and lets you write powerful server-side web applications.
Shaun Moore
6,301 PointsPHP is probably the most popular scripting language on the web. It is used to enhance web pages. With PHP, you can do things like create username and password login pages, check details from a form, create forums, picture galleries, surveys, and a whole lot more. If you've come across a web page that ends in PHP, then the author has written some programming code to liven up the plain, old HTML.
PHP is known as a server-sided language. That's because the PHP doesn't get executed on your computer, but on the computer you requested the page from. The results are then handed over to you, and displayed in your browser. Other scripting languages you may have heard of are ASP, Python and Perl. (You don't need to know any of these to make a start on PHP. In fact, these tutorials assume that you have no programming experience at all.)
The most popular explanation of just what PHP stands for is "Hypertext Pre-processor". But that would make it HPP, surely? An alternative explanation is that the initials come from the earliest version of the program, which was called Personal Home Page Tools. At least you get the letters "PHP" in the right order!
But PHP is so popular that if you're looking for a career in the web design/web scripting industry then you just have to know it! In these tutorials, we'll get you up and running. And, hopefully, it will be a lot easier than you think.
jason chan
31,009 PointsPHP is used for CRUD. Create READ UPDATE and DELETE.
You use php to create web forms to store data, but php can do more than that with libraries. PHP can zip entire folders. Change resolution of pictures.
Php can be used to data analysis (easier with excel, but possible) and create bots. You can do a lot.
Raphael Reiter
6,820 PointsThanks guys ! now it's a bit more clear in my head.
I know it says you don't have to, but would you suggest I start with php after I have done basic html and css or should i get into more advanced css before starting on this track?
Shaun Moore
6,301 PointsPersonally I suggest you complete a few tasks on HTML and CSS you you can get a basic understanding of them (plus you will still use HTML/CSS to build websites)
But PHP is very easy to learn (Start with this http://teamtreehouse.com/library/php-basics)
Hope this helped -Shaun