Learn PHP! Beginner PHP Tutorials
Posted February 9, 2010 by Nick Vogt in Programming
So you've mastered HTML, made a few websites -maybe one for your dog, and now you want to know what's next. Well, besides simply practicing and becoming better at design, which is always good, you can try your hand at server-side coding. Server-side coding is programming that is written into the document and is executed by the web server prior to sending out the HTML document to the user's browser. It allows websites to do things dynamically. For example, it is what drives H3XED and allows you to filter and search for posts, and it allows me to write and edit posts easily using a web interface (rather than editing the HTML directly).Let's break it down:
* Regular HTML (static) document:
User browses to the URL (EX: http://www.site.com/index.html), sends request to web server for HTML file, receives HTML file, browser interprets HTML and displays web page on the fly.
* Dynamic PHP document:
User browses to the URL (EX: http://www.site.com/index.php), sends request to web server for PHP file, server parses PHP file and runs any scripts/commands needed to generate an HTML document dynamically (usually based on user input through the query string or forms), then sends the PHP file to the browser, where the browser interprets it and displays it normally.
Confused yet? It really helps if you dive into it. I have prepared a series of tutorials on my guides site, which will walk you through the basics of PHP:
- PHP Guide 1: Comments, echo construct, math operators and variables
- PHP Guide 2: Loops and Arrays
- PHP Guide 3: Working with GET and POST Form data
- PHP Guide 4: Conditionals and Operators
- PHP Guide 5: Functions (so you can derive while you derive)
- PHP Guide 6: How to Connect to a MySQL Database
| Tags | php tutorial |
|---|
