Documente Academic
Documente Profesional
Documente Cultură
Of
Summer Training
Project At
On
PHP WITH MY SQL
Submitted
In The Partial Fulfillment of
Bachelor of Technology
Department of Computer Science & Engineering/Information
Technology
United College Of Engineering And Management
2019-20
1
Certificate
I am Shubhangi Sahu, student of B.Tech (IT), 4th year of United College Of Engineering and
Management, Naini completed my summer training from United for 15 days during June 2019.
During the mentioned period I worked at PHP with My sql and completed my summer training
project entitled”Online Transportation Management and E-Bus Pass System” under the guidance
of Mr.Dhananjay Sharma.
There is always a sense of gratitude which one express towards others for their help and supervision in
achieving the goals. This formal piece of acknowledgement is an attempt to express the feeling of
gratitude towards people who helpful me in successfully completing of my training
I would like to express my deep gratitude to Mr. Vikrant Singh ,my training coordinator for their constant
co-operation. He was always there with his competent guidance and valuable suggestion throughout the
pursuance of this research project.
I would also like to place of appreciation to all the respondents and group members whose responses and
coordination were of utmost importance for the project.
Above all no words can express my feelings to my parents, friends all those persons who supported me
during my project. I am also thankful to all the respondents whose cooperation & support has helped me
a lot in collecting necessary information
3
TABLE OF CONTENTS
1. Certificate------------------------- 2
2. Acknowledgment------------------3
3.Company Profle…………………5
4.Technology………………………6-23
4.1 HTML……………………… 6
4.2 CSS……………………………7
4.3 JavaScript…………………… 8
5. Project…………………………… 24-27
6. References………………………… 28
4
COMPANY PROFILE
The United Group , founded by late Shri Shiv Ram Das Gulati in
1951 emerged from a transport business to the giants in the fields of
education, services, transportation and journalism. The group made a mammoth
leap in the education arena in the mid 80s by being the pioneers in computer
education.
Now, with 08 well established institutes in Allahabad and Greater Noida, over
11200 students and more than 750 faculty members, the United Group of
Institutions is poised to reach the next level providing the best technical
education. Our establishment offers NBA accredited courses, Quality recognised
by the World Bank and boasts of more than 14000 alumni base.
All the Institutions are affiliated to AKTU, Lucknow and approved by All India
Council for Technical Education (AICTE), Ministry of Human Resources
Development, Government of India, New Delhi.
United Institutes works on the motto of holistic education of its students. Hence
every measure is taken that their progress does not remain constrained to the
classrooms. Ample scope for extracurricular activities along with classroom
syllabus keeps the student at par with the best of the institutes.
Special care is given to the courses of the student which demand industrial
trainings and visit.
The Naini industrial area provides the perfect opportunity for the students to gain
hands on
experience and getting to know the grooves of the industry.
\
5
TECHNOLOGY
Introduction to html-
1. HTML stands for HyperText Markup Language.
2. It is a client side programming languages.
3. The extention of HTML may be .htm or .html
4. It is not a case sensitive language
5. it is a Tag based language, & the tags could be classified into two types
a) single tag (<tag> or <tag/>) ex. <br>,<hr>
b) paired tag (<tag>.....</tag>) ex <html>,<body> etc
6. you can write html program on any editor like notepad, but some specific
IDEs are-
a) Dreamweaver
b) FrontPage
7. It executes on a web browser.
Basic HTML Tags-
<html>- indicates starting of a html program
<head>- it is container tag contains <title>,<script>,<style> etc
<title>- sets the title of a page
<body>- specifies the contents of a page
Text Formatting Tags-
<h1>...<h6>- They specifies the heading
<font> - sets the font color & style
<hr>- draw the horizontal line, it is a single tag
<br>- change a line, it is also a single tag
<b>- Bold
<i>- Italic
<u>- Ubderline
<big>- Big Text
<small>- Small Text
<pre>- pre formatted Text
<sup> - Superscript
<sub>- Subscript
<p>- Paragraph
6
Css-
It is used for formatting the contents of a page,like heading style,font style etc
2. You can control the whole design of a website using css.
3. The extenton of CSS must be .css
Type of CSS- It could be classified into 3 types-
1. inline style
2. <style> tag
3. cascading style sheet(.css)
inline style- it allows you for specifiying the style of the content just inside the
tag.Syntax will be-
7
JAVA SCRIPT-
Variable- for declaring a variable you can follow the following syntax-
var variable_name;
Javascript is a loosly typed programming language, means you can use a variable
without its declarion.by default it contains object type values but for conversion
you can use-
parseInt()
parseFloat()
parseDouble()
Operators-
1. Assignment Operator(=)
2. Arithmetical Operator(+,-,*,/,%)
3. Relational Operator(<,<=,>,>=,==,!=)
4. Logical Operator(&&,||,!)
5. Increment/Decrement Operator(++,--)
6. Conditional Operator(?:)
Events-
Events are the actions which indicates happening of any operation.Some most
frequently used events are-
Onload- fires when the page is loaded
Onunload- fires when the page unload from browser
onClick-fires when object is cliked
Onblur- when the focus goes out
Onfocus- when the focus comes in
Onchange- when the value is changed
8
Bootstrap-
This responsiveness is achieved using a fluid Bootstrap grid system that can be
applied to appropriately scale up to 12 columns according to the size of the device
or viewport. Grids provide structure to the layout, defining the horizontal and
vertical guidelines for arranging content and enforcing margins. Grids also offer an
intuitive structure for viewers, because it’s easy to follow a left to right, or a right
to left flow of content moving down the page. Before grids, and before CSS was so
powerful, grid based layouts were achieved by using tables, where the content
would be arranged inside table cells. As CSS became more mature, a number of
CSS frameworks for grid-based layouts started to appear. These include YUI
grids, 960 GS and blueprint, to name a few.
BOOTSTRAP TYPOGRAPHY-
Bootstrap brings some more goodies to table besides pure CSS reset. It comes
with normalize.css, an HTML5-ready alternative to CSS resets, and it also has
some well-designed defaults of its own.
9
For example, Bootstrap sets the global default font-size to 14px, with a line-
height of 1.428. The default font is changed to Helvetica/Arial, with sans serif
fallback.
All these styles are applied to the <body> and all paragraphs, with the addition
that <p> (paragraphs) receive a bottom margin of half their computed line-height
(10px by default). Besides these defaults, there are also customizable styles for
standard HTML tags that bring more consistency to the text, such as highlighted
text ( <mark> ), deleted text ( <del> and <s> ), underlined text ( <u> ), small text
( <small> ), and bold text ( <strong> ). Alignment classes help to arrange content
on the page more easily by using .text-left , .text-center , .text-right , .text-
justify and .text-nowrap classes. There are also predefined styles for block
quotes, and unordered and ordered list, with inline options, just to name a few.
FORMS-
Forms have come a long way over the years, and today using a web form is one of
the most common activities performed while browsing the web. While HTML5
introduced a number of new form attributes, input types, and other helper elements,
browsers haven’t visually improved forms much. This is one area where Bootstrap
really shines, because aligning and styling labels and inputs, validating forms, and
showing error messages, can be tricky without some help.First, Bootstrap sets all
textual input elements, like <input> , <textarea> , and <select> , to 100% width
of the parent form element. It also gives you the ability to choose between inline
forms, which will render multiple labels and input fields in the same line, by using
the .form-inline class, or horizontal forms, which use grids to align each input in
its own row, by using the .form-horizontal class. And if you need to place plain
text next to a form label, instead of the input field, you can give it the .form-
control-static class to make it match the visual look of the form.
10
Buttons, Button Groups, and Button Dropdowns-
Buttons are one of the things every browser renders totally differently. If you want
to have consistent design across all browsers, this is potentially a big problem.
Luckily, Bootstrap has an elegant solution for buttons also. And besides making
them consistent, it brings a lot of variations to play with. You can apply
the .btn class to <a> and <input> elements. You can group a series of
buttons together into a single line using the .btn-group class on the parent <div> .
With a little help from JavaScript, you can create radio- and checkbox- style
behavior on buttons. Or you can turn your buttons into dropdown menus by
placing it within a .btn-group , and providing the proper menu markup of
unordered list of items.
Navbars-
11
Php with mysql-
What is an API?
An Application Programming Interface, or API, defines the classes, methods,
functions and variables that your application will need to call in order to carry out
its desired task. In the case of PHP applications that need to communicate with
databases the necessary APIs are usually exposed via PHP extensions.
When writing PHP applications that need to connect to the MySQL server there are
several API options available. This document discusses what is available and how
to select the best solution for your application.
What is a Connector?
In the MySQL documentation, the term connector refers to a piece of software that
allows your application to connect to the MySQL database server. MySQL
provides connectors for a variety of languages, including PHP. If your PHP
application needs to communicate with a database server you will need to write
PHP code to perform such activities as connecting to the database server, querying
the database and other databaserelated functions. Software is required to provide
the API that your PHP application will use, and also handle the communication
between your application and the database server, possibly using other
intermediate libraries where necessary. This software is known generically as a
connector, as it allows your application to connect to a database server. What is a
Driver? A driver is a piece of software designed to communicate with a specific
type of database server. The driver may also call a library, such as the MySQL
Client Library or the MySQL Native Driver. These libraries implement the low-
level protocol used to communicate with the MySQL database server.
php variable-
In PHP, a variable starts with the $ sign, followed by the name of the variable.
12
Php datatypes-
Variables can store data of different types, and different data types can do different
things.PHP supports the following data types:
• String
• Integer
• Float (floating point numbers - also called double)
• Boolean
• Array
• Object
• NULL
• Resource
PHP STRING-
A string is a sequence of characters, like "Hello world!".A string can be any text inside
quotes. You can use single or double quotes
PHP INTERGER-
PHP FLOAT-
A float (floating point number) is a number with a decimal point or a number in
exponential form.
PHP BOOLEAN-
$x = true;
13
$y = false;
Booleans are often used in conditional testing. You will learn more about
conditional testing in a later chapter of this tutorial.
PHP ARRAY-
PHP OBJECT-
An object is a data type which stores data and information on how to process that
data.In PHP, an object must be explicitly declared.First we must declare a class of
object. For this, we use the class keyword. A class is a structure that can contain
properties and methods.
Null is a special data type which can have only one value: NULL.A variable of
data type NULL is a variable that has no value assigned to it. If a variable is
created without a value, it is automatically assigned a value of NULL.
PHP RESOURCES-
The special resource type is not an actual data type. It is the storing of a reference
to functions and resources external to PHP.A common example of using the
resource data type is a database call.
PHP OPERATORS-
• Arithmetic operators
• Assignment operators
• Comparison operators
• Increment/Decrement operators
• Logical operators
• String operators
• Array operators
14
• Conditional assignment operators
The PHP assignment operators are used with numeric values to write a value to a
variable.The basic assignment operator in PHP is "=". It means that the left
operand gets set to the value of the assignment expression on the right.
x=y x=y The left operand gets set to the value of the
expression on the right
x += y x=x+y Addition
x -= y x=x-y Subtraction
x *= y x=x*y Multiplication
x /= y x=x/y Division
x %= y x=x%y Modulus
15
PHP Comparison Operators
The PHP comparison operators are used to compare two values (number or string):
19
Operator Name Example Result
20
PHP LOOPS-
Often when you write code, you want the same block of code to run over and over
again a certain number of times. So, instead of adding several almost equal code-
lines in a script, we can use loops.
Loops are used to execute the same block of code again and again, as long as a
certain condition is true.In PHP, we have the following loop types:
MY SQL-
• MySQL is a database system used on the web
• MySQL is a database system that runs on a server
• MySQL is ideal for both small and large applications
• MySQL is very fast, reliable, and easy to use
• MySQL uses standard SQL
• MySQL compiles on a number of platforms
• MySQL is free to download and use
• MySQL is developed, distributed, and supported by Oracle Corporation
• MySQL is named after co-founder Monty Widenius's daughter: My
DATABASE QUERIES-
A query is a question or a request.We can query a database for specific information
and have a recordset returned.
21
MYSQL CONNECT –
Before we can access data in the MySQL database, we need to be able to connect
to the server:
<?php
$servername = "localhost";
$username = "username";
$password = "password";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
MYSQL FUNCTIONS-
• mysql_affected_rows — Get number of affected rows in previous MySQL
operation
• mysql_client_encoding — Returns the name of the character set
• mysql_close — Close MySQL connection
• mysql_connect — Open a connection to a MySQL Server
• mysql_create_db — Create a MySQL database
• mysql_data_seek — Move internal result pointer
• mysql_db_name — Retrieves database name from the call to mysql_list_dbs
• mysql_db_query — Selects a database and executes a query on it
• mysql_drop_db — Drop (delete) a MySQL database
• mysql_errno — Returns the numerical value of the error message from
previous MySQL operation
• mysql_error — Returns the text of the error message from previous MySQL
operation
• mysql_escape_string — Escapes a string for use in a mysql_query
• mysql_fetch_array — Fetch a result row as an associative array, a numeric
array, or both
• mysql_fetch_assoc — Fetch a result row as an associative array
• mysql_fetch_field — Get column information from a result and return object
22
• mysql_fetch_lengths — Get the length of each output in a result
• mysql_fetch_object — Fetch a result row as an object
• mysql_fetch_row — Get a result row as an enumerated array
• mysql_field_flags — Get the flags associated with the specified field in a
result
• mysql_field_len — Returns the length of the specified field
• mysql_field_name — Get the name of the specified field in a result
• mysql_field_seek — Set result pointer to a specified field offset
• mysql_field_table — Get name of the table the specified field is in
• mysql_field_type — Get the type of the specified field in a result
• mysql_free_result — Free result memory
• mysql_get_client_info — Get MySQL client info
• mysql_get_host_info — Get MySQL host info
• mysql_get_proto_info — Get MySQL protocol info
• mysql_get_server_info — Get MySQL server info
• mysql_info — Get information about the most recent query
• mysql_insert_id — Get the ID generated in the last query
• mysql_list_dbs — List databases available on a MySQL server
• mysql_list_fields — List MySQL table fields
• mysql_list_processes — List MySQL processes
• mysql_list_tables — List tables in a MySQL database
• mysql_num_fields — Get number of fields in result
• mysql_num_rows — Get number of rows in result
• mysql_pconnect — Open a persistent connection to a MySQL server
• mysql_ping — Ping a server connection or reconnect if there is no
connection
• mysql_query — Send a MySQL query
• mysql_real_escape_string — Escapes special characters in a string for use in
an SQL statement
• mysql_result — Get result data
• mysql_select_db — Select a MySQL database
• mysql_set_charset — Sets the client character set
• mysql_stat — Get current system status
• mysql_tablename — Get table name of field
• mysql_thread_id — Return the current thread ID
• mysql_unbuffered_query — Send an SQL query to MySQL without fetching
and buffering the result row
23
PROJECT
Object
Online House Renting System
Conceptual Models
• ER Diagram
24
• Data Flow diagram
25
• Level 1 DFD
26
MODULE DESCRIPTION
Registration/login-
The Online House Rental System in Registration Modules is used to collect the
personal information. It has to collect the address, name, phone number also. The
registration modules details are stored in the database.
booking-
Online House Rental System has an implementation of house booking where only
registerd number are allowed to view and book house /office/land/home for rentel
or lease.
House Rental System has been implemented with house posting module where the
seller/landlord or system administrator can upload house/property details for sale
or rent.
27
REFERENCES
28