What's new

Basic PHP Tutorial [WORK IN PROGRESS]

  • Thread starter KentxModz
  • Start date
  • Views 774
KentxModz

KentxModz

Rapid Fire Mod Maker
Messages
121
Reaction score
18
Points
70
Sin$
7
First off, I would like to say this is a work in progress and that I made this tutorial to help out the community because I didn't see to many topics covering this. I understand that this can be common sense and may be easier to some users than it might be for others. Either way, this can be used to learn some PHP for first timers and even as a reference guide to the more experienced people for your own coding. Now with that being said, let's begin shall we.

Prerequisites

You need a good knowledge about HTML, XHTML, and finally, JavaScript. these are essential for learning to code for PHP. I strongly recommend that you look at some tutorials on the coding types above until you feel that you are ready to begin learning this code.

Understanding PHP

PHP stands for PHP: Hypertext Pre-processor. It is a server-side scripting much like ASP. PHP scripts are executable from the server and can be used to preform calculations, interact with MySQL databases, and even create graphics! Along with MySQL, it can interact with Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, and more. It is a open source software and is free to download and use at will.

There are several reasons for choosing PHP. PHP runs on different platforms (Windows, Linux, Unix, etc.) It is compatible with almost all servers used today (Apache, IIS, etc.) PHP is FREE to download from the official PHP resource: www.php.net and it is easy to learn and runs efficiently on the server side.

Where to begin

The start off, you will need to get setup in order to test some of your coding. I would suggest the follwing:
  • Install Apache (or IIS) on your own server, install PHP, and MySQL
  • Or find a web hosting plan with PHP and MySQL support
If your server supports PHP you don't need to do anything. Just create some .php files in your web directory, and the server will parse them for you. Because it is free, most web hosts offer PHP support. However, if your server does not support PHP, you must install PHP. Here is a link to a good tutorial from PHP.net on how to install PHP5.
Tutorial :http://www.php.net/manual/en/install.php
Download PHP for free here: http://www.php.net/downloads.php
Download MySQL for free here: http://www.mysql.com/downloads/
Download Apache for free here: http://httpd.apache.org/download.cgi

Learning basic PHP syntax

Similar to HTML (and many other web-based codes), there are common scripts that all of the documents of that particular coding must follow. Ex. <HTML> and </HTML>
PHP’s code is as follows:
<?php
?>

 
Top Bottom
Login
Register