PHP My Admin

phpMyAdmin is software tool that is free. It’s written in PHP and handles the administration of MySQL over the WEB. phpMyAdmin handle operations such as managing databases, tables, columns, relations, users, permissions etc. In phpMyAdmin these actions can be performed through user interface without a need to directly execute SQL statement.

For Our project “Bored in Bournemouth” we had to create 2 tables in phpMyAdmin. First One that manages the data and the relation between register and logged in users and the second one for “submit your day out” page which stores the information in the database about what day out the registered user submitted.

User Table 

rsz_user

 

The User table created consisted of 5 entities which are:

  • User ID – In Auto increment so that all users are unique (which starts from 0 an goes up )
  • User name – Varchar(255) can consist letter and numbers no more that 255 characters. User can input a username he wants as long as it is not taken.
  • Password – Varchar (255). User chooses a password.
  • Email – Varchar (255). User inputs his email address.
  • Date Joined – Give a date stamp in the database when the user have registered

Submit your day out FORM 

rsz_form

The User table created consisted of 6 entities which are: 

  • ID – In Auto increment so that all day out are unique (which starts from 0 an goes up )
  • User name – Varchar(255) can consist letter and numbers no more that 255 characters. For Authentication that the user is logged in.
  • Name –  Varchar(255) User insert the name of the day out.
  • Description- Text. User inserts the description of the day out.
  • Location – Text. User inserts the location of the day out.
  • Rating – Int. User gives a rating value for the day out from 1 to 5.

 

PHP and MySQL

What is PHP ?

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.”

This one of the definition You can find on the web about what is PHP. This definition is from http://php.net/. So what are the features of PHP then? To understand that I have to outline that PHP is different from static html. This is because HTML run from your computer and PHP doesn’t get executed on your computer, but on the computer you requested the page from. Instead of writing a lot of commands using HTML , PHP allows you to embedded code which does “something”. The PHP code is read from top to bottom until the end of the process. If a user views the page source of a website that contains PHP he only sees the answers that PHP executes. This is enclosed in special start and processing instructions (<?php and ?>) which allows to jump in and out from PHP mode.

PHP Features 

  • Does not execute on your computer
  • It allows to enhance the HTML code
  • PHP is server side scripting
  • Allows you to create website application with registrations, log in pages, content upload ect.
  • PHP is free
  • PHP can be run on any operating system

These are one of the many features of PHP. For our website application we had to use PHP as well as it contains content upload, registration and log in. I will go into more details of PHP used in our website application in another blog post.

What is MySQL

“MySQL is a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).”

MySQL is the most popular open source database management system. MySQL has been developed, distributed and supported by Oracle Corporation. Is use GNU (General Public Licence) which means that everyone can look at the MySQL script and update it to suit their needs. MySQL database is a rational database. This means that instead of storing a lot of data in one place the date is split in separate tables. in MySQL databases you can set up relationships between different data. The database is able to recognize the relationships so that you don’t have duplicate data, out of date data or missing data. The SQL which stand for Structured Query Language is used to follow the rule between the relationships. Therefore SQL is used to communicate with the database.

MySQL Features: 

  • Open source (general public can edit the script to suit their needs)
  • Free to use
  • Uses rational database management system
  • Allows to set rules and parameters for data
  • Make relationship between different data
  • Information is stored in different tables rather than in once place

References: 

http://www.homeandlearn.co.uk/php/php1p1.html

https://www.siteground.com/tutorials/php-mysql/mysql.htm

https://dev.mysql.com/doc/refman/4.1/en/what-is-mysql.html

http://www.sqlcourse.com/intro.html

http://php.net/manual/en/intro-whatis.php