The part we start off on today with the continuation of our PHP Reservations web application, we started at with Reservations Web Application Primer Tutorial as shown below, relates to an “early days” look at a proposed MySql database structure we can use with our application.
As we also said yesterday, we see the crux of a reservation system as needing a …
- timeline display mechanism … yesterday’s work
- a database of some sort … today’s work … and for the future … at the very least …
- reports of sorts
- a payment system gateway arrangement … if you want online bookings to be a possibility … though we may not be doing this, because our project is fictional
We hope over time, at this blog, that we’ve imbued an enthusiasm and admiration for the combination of PHP and MySql … our Fred and Ginger functionality duo … and the Edward Everett Horton of supporting acts … phpMyAdmin.
MySql databases, in relation to PHP, are often seen as the “backend”, and it can be good for envisagement reasons and organizational reasons to compartmentalize a project into this “backend” (database) and “frontend” (web application).
And so, in these early stages, it is debatable with design whether to work from the database “out” or the web application “in”, but either way, it is probably a database like MySql with the serverside language like PHP that will be needed to achieve the needs of a project like this with any commercial value.
Plan ahead in these matters for whether any online payment (gateway) system arrangement fits in with your plans. There are also “out of the box” ways to approach this, especially with PHP, as well, that some search engine searches could soon uncover.
Please know we are only advising on the gist of some of the components that go into such a job, but there are loads and loads of different approaches to trying to achieve all this.
So here is some SQL (that starts with “use users;” (ie. our database is called users but you can call it what suits your project) you could use with MySql to follow up the phpMyAdmin interactive bits …
create database users CHARACTER SET = utf8 COLLATE = utf8_bin;
create user 'stay_user'@'localhost' IDENTIFIED BY 'password';
… you could call reservation.sql that can be executed with MySql command line or, like we did with tutorial picture, interactively, in a phpMyAdmin SQL window … cute, huh?!
To not create the database in the same SQL as with the table creation SQL is a good security measure that many eCommerce and blog installations make use of, so that this whole set of procedures is not too automatic … (that a robot could do it) … “not that there’s anything wrong with that”.
We’ll be back with more as time goes on.
Previous relevant Reservations Web Application Primer Tutorial is shown below.
We’re setting off on what could be a long running project to construct a PHP Reservations web application today.
We see the crux of a reservation system as needing a …
- timeline display mechanism … today’s work … and for the future … at the very least …
- a database of some sort
- reports of sorts
- a payment system gateway arrangement … if you want online bookings to be a possibility … though we may not be doing this, because our project is fictional
So with the “timeline display mechanism” let’s use a Google Chart Timeline Chart which we …
- first mentioned with PHP/Javascript/HTML Google Chart Timeline Chart Tutorial
- last mentioned with Google Chart Select Event Calendar Timeline Post Tutorial
So here is the PHP source code you could call reservation.php and it was changed from the Timeline Chart code as per this link. Here is a live run link, as well.
We’ll be back with more.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
3 Responses to Reservations Web Application Database Tutorial