Monday, 15 December 2014

Creating websites using PHP embedded HTML| Incorporating MySQL database

So, in a process of developing this website, I will be jotting down all the prerequisites and the steps thereafter in order to make a php website live online.
Hope it will help the struggling newbies in this field.

Before moving on, let's understand:

I. What's PHP?

PHP, the term derived from "Hypertext Preprocessor", is a server-side, HTML embedded scripting language used to create dynamic Web pages.
As it's server-side related application it does not require any configuration at the client's/viewer's side since the code itself is executed on the server where it's residing.
All that is required is any Web browser currently existing, but that will not suffice to develop php websites, we need to set up a website development environment. (We will be looking after it a bit later. )
Having the PHP as an embedded implementation at the HTML pages within the special PHP tags at the server side no one would be able to access the code itself through the browser as being able with the plain HTML language.
It's syntax parts is borrowed from other languages as C, Java and Perl with some unique features thrown in.
The main goal of the PHP oriented language is to provide the easiest way of generating and developing dynamic Web pages to the developers or site designers.
The PHP language offers an reliable connectivity services to the various database services like MySql etc. The database management tool phpMyAdmin, most popular bullet in board interfaces like PHPBB or PHPNuke are related on the PHP language as well. Internet related connection services as e-mail, email via POP3 or IMAP, url encoding, cookies, redirections etc. are available through the PHP as it's web oriented.
[Source: http://www.oxxus.net/tutorials/php ]
So for this particular website we will be using MySQL for the database.
If you have heard the term "PHP" in your life for less than 7 times, you are recommended to view source of this website to understand what php enabled websites look like at the back end part.
Go to this website, right click and select "View Source", there are three PHP scripts running in the back end.  http://www.neil-kb.com/

II. TOOLS WE WOULD  BE NEEDING:

1. MySQL
2. XAMPP
3. PHPMyAdmin
4. Text Editor
5. Local Host settings....may be. 

Go to this link to dive deep:

Install XAMPP by following these steps:
http://computernetworkingnotes.com/ubuntu-12-04-tips-and-tricks/how-to-install-xampp-1-8-2-in-ubuntu.html

Have SQL installed and configured.
                      


III. Three main youtube videos that will get you started with dynamic websites are these:
What is actually happening?

Unlike the static html pages, this time we need the content to be displayed dynamically by running a php script.
So, the php script senses the argument passed and accordingly loads the corresponding page. PHP facilitates to interact with MySQL or other databases and get the content loaded from there.
This is briefly what is happening in the following videos, have a glance.
 
1. https://www.youtube.com/watch?v=G4DZW9IFQ_U


2. https://www.youtube.com/watch?v=HFZbW9eDRAM

3. https://www.youtube.com/watch?v=SETjgigQmBE

Also, this may help in the process of learning:

https://www.youtube.com/watch?v=IMuhWHO_T-0




So, hope the content and links would prove useful.

Keep hacking!





No comments:

Post a Comment

HIGH FIVE ~ Programming tips [C#]

Hello World! Over my tenure as an engineer I got a lot of insights into the C# language (which BTW is Microsoft's own language :D ...