Skip to main content

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!





Comments

Popular posts from this blog

Duh - Saves you the trouble to correct your command

Duh.

This is no more an expression for me but a command now. Thanks to the hack I have been doing for past couple of days.

What's it about? Well, here it goes.

How many times it happens that we screw up commands on terminal?
A typo, a syntax mistake or jumbled up arguments. The command doesn't run and then we spend time retyping it ensuring everything is in place this time.
Quite time consuming, eh?




My laziness simply denied me such a behaviour. So I coded up a powershell cmdlet which can do this for me.
Now if I mess up a command, I just have to type 'Duh' and the right command will be displayed on the prompt for you to check and execute (press ENTER).

How Duh operates internally?
Well, guess what. Answer lies in the "tries".
We have a trie and we do closest match using Leveinshtein Distance.
In short, how to figure out how close two strings are?  Find the no of letters you need to remove/insert/replace in order to attain string 2 from string 1.
This is wha…

How would you make an HTML Parser?

Hola folks,

Here we will be walking through how html is being parsed by a widely popular parser: Angle Sharp
You can find it here !
This is just a walkthrough and gives an idea on the breadth of issues  one has to deal with while designing a parser.

Let's sneak peek into what kind of data structures are used and how is the code structured.


It all begins with this line:
var parser = new HtmlParser();
We have folowing variations in constructing the HtmlParser object:

  public HtmlParser()
            : this(Configuration.Default)
        {
        }

        /// <summary>
        /// Creates a new parser with the custom options.
        /// </summary>
        /// <param name="options">The options to use.</param>
        public HtmlParser(HtmlParserOptions options)
            : this(options, Configuration.Default)
        {
        }

        /// <summary>
        /// Creates a new parser with the custom configuration.
        /// </summary&…

What emotions run through your playlist?

Hola !!

Long time. So I was upto creating this application one night , I named: "Playlist Emotions" , "What does the song says" :P , "PlayWithEmotions" and what not, each project of a failed experimentation.

Duh.

The project took way too long. Thanks to the noble idea of making and deploying it as a GWT application and then to improve upon the GUI of the app.
FYI , I tried but done neither of the things above. My Google Console developers trial account  supposedly has some issues with this app, yet to be resolved. So before the entire idea behind the app and the excitement of results it displays fades out , I thought, lemme write a blog post on the same.


So what is this all about?

The idea originated from a candid discussion with my friend on how songs influence our moods and also how our emotions affect the type of songs we listen to.

Being fascinated about knowing what kinds of songs I listen to, I thought of creating an application where I would just e…