CHAPTER ONE
INTRODUCTION
A car rental, hire car, or car hire agency is a company that rents automobiles for short periods of time, generally ranging from a few hours to a few weeks. It is often organized with numerous local branches (which allow a user to return a vehicle to a different location), and primarily located near airports or busy city areas and often complemented by a website allowing online reservations. Car rental agencies primarily serve people who require a temporary vehicle, for example those who do not own their own car, travelers who are out of town, or owners of damaged or destroyed vehicles who are awaiting repair or insurance compensation. Car rental agencies may also serve the self-moving industry needs, by renting vans or trucks, and in certain markets other types of vehicles such as motorcycles or scooters may also be offered. Alongside the basic rental of a vehicle, car rental agencies typically also offer extra products such as insurance, global positioning system (GPS) navigation systems, entertainment systems, mobile phones, portable WiFi and child safety seats. The starting point of Car renting is really unknown as said by Thomas Pretty; he also mentioned that many beliefs that Joe Saunders was the first man to start a Car renting company. According to Thomas Pretty, charges were calculated with the help of mileage tracking device. Many people became interested in the Car rental business and hence got involved. Car renting became more popular as years pass by. Today Car renting services is found all over the world, especially in the developed and developing countries. To make this service more popular and accessible to the public it has been transform into a web base system and connected to the internet were everyone can be able to have access to it [1].
To implement the car hiring management system, the technologies adopted for the development of the system and are Hyper Text Markup Language (HTML), Java script, pHp (Hypertext preprocessor) and MySql database. These technologies were chosen because they are well suited for web-based applications.
HTML is the acronym for hypertext markup language. It is the basic language used to develop web content. It uses tags to represent commands. Every tag have a specific function.
Java script is a scripting language that helps in making web pages dynamic. It is also used for front end processing of captured data from web forms.
pHp is a recursive acronym and it means PHP hypertext pre-processor:. It is used to link the data in web-page forms to the MySql database.
Mysql is a server side database technology for web-based or network-based applications.
The source code below is used to add new car and update car status to database.
<?php
require_once(‘connect.inc.php’);
?>
<?php
if (isset($_POST[‘submit_btn’])){
$cost= $_POST[‘cost’];
$status = $_POST[‘status’];
$file_name=$_FILES[‘file’][‘name’];
$tmp_name = $_FILES[‘file’][‘tmp_name’];
$ran1=rand(100,400);
$ran2=rand(1000,100);
$car_id = ‘CAR’.$ran1.$ran2;
if(!empty($cost) && !empty($status) && !empty($file_name)){
$location = ‘upload/’; //creating a location or folder where my passport will be stored
if (file_exists($location.$file_name)) {
echo ‘car name already exist, please rename the car name’;
}else{
(move_uploaded_file($tmp_name, $location.$file_name));
$car_full_path = $location.$file_name;
$query="INSERT INTO `car_reg_tbl` VALUES (",’$car_id’,’$cost’,’$status’,’$car_full_path’)";
if($query_run=mysql_query($query)){
echo ‘New car saved sucessfully’;
}else{
echo mysql_error();
}
}
}else{
echo ‘All fields are required’;
}
}elseif (isset($_POST[‘update_btn’])){
$car_id_updatet= $_POST[‘car_id_update’];
$status_update = $_POST[‘status_update’];
if(!empty($car_id_updatet) && !empty($status_update)){
$query= "SELECT `car_id` FROM `car_reg_tbl` WHERE `car_id`='".mysql_real_escape_string($car_id_updatet)."‘";
$query_run =mysql_query($query);
$query_num_rows = mysql_num_rows($query_run);
if($query_num_rows==0){
echo ‘Invalid Car Id’;
}else if ($query_num_rows==1) {
$query="UPDATE `car_reg_tbl` SET status=’$status_update’ WHERE `car_id`=’$car_id_updatet'";
if($query_run=mysql_query($query)){
echo ‘Status updated successfully’;
}else{
echo mysql_error();
}
}
}else{
echo ‘Please provide a car id and a stutus which you want to update’;
}
}
?>
ADD NEW CAR
Cost per day:
Status:
Available
Not Available
Car Image:
UPDATE CAR STATUS
Car Id:
Status:
Available
Not Available
1.2 Statement of the Problem
The problem with some of the current system is that:
Based on observations, some small companies already have a car hiring system which is not a web based application. This is a limitation that gives them capability to store customer’s details, but at the same time they cannot make their services more available to the public through the internet, they rather make use of posters to advertise their services to the public. These types of companies can overcome these problems by switching to the web base application of their type of system.
They also make use of phone call reservations which is also limited to many features as compare to a web base system. For example a customer may make a phone call reservation for a particular car, but when he/she comes to pick the car, he/she might turn not to like the car; this could be because the customer could not see a sample picture of the car he/she wants to rent.
1.3. Aim and Objective of the Study
The main objective of this research work is to provide convenience to the management team by developing a computerized system to make processes regarding car rental easier.
The main objectives of this project are as follows: