Вы находитесь на странице: 1из 50

COLE SUPRIEURE D'INGNIEURS EN GNIE LECTRIQUE

(ESIGELEC) ROUEN, FRANCE





WEB DEVELOPMENT USING PHP AND HTML
INTERNSHIP REPORT

Student Name
Deepaka Srirama Bairy


Course: M.Sc Control and Embedded Instrumentation



Guided By:
ASHISH SHETTY BALAJI B
Mahodati Infotech Services Pvt Ltd, Bangalore MCIS, Manipal








Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 2

ACKNOWLEDGEMENT
I would like to use this opportunity to express my feelings to all the people for making my
project a success. I would like to extend my thanks and gratitude to my Guide at Mahodati Infotech
Services Pvt. Ltd., Mr. Ashish Shetty, Managing Director, who provided me with an opportunity to
work with such an esteemed organization and for providing me with an opportunity to work in web
development and also for his encouragement and support in various ways.
I am highly thankful to my internal guide Mr. Balaji.B, Assistant Professor of Manipal
Centre for Information Science for all his support and valuable suggestions and feedbacks. I would
also like to thank my Branch Manager Mr. Nagaraj K, and the team members of my Project. I
would also like to thanks Mr. Ramasheha, Project coordinator Manipal Centre for Information
Science, Manipal who guided me to complete the necessary requirements at college for the success
of my project. I would also like to thank Prof Harischandra Hebbar, Director of MCIS and Prof
Jean Jacques Delarue, Director of ESIGELEC and Prof PK Shetty, Professor of MCIS for the
support and valuable suggestions throughout my project.
Last but not the least a special vote of thanks to all team members for extending co-
operation and support during the course of the project and providing various seminars and
guidelines which helped me throughout the project tenure.










Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 3

ABSTRACT

This report describes my role in building websites using PHP and HTML. In Mahodati
Infotech Carrying out web design and development, software development, E-Publication and data
Management.
My task in the company is to develop the website using PHP, HTML and Mysql. For this
process I use tools such as Dreamweaver, Notepad++, Xxamp server, Mysql and File Zilla. The
main reason to use PHP is to make the website simple, flexible and easier to maintain.
We developed chithrakoota Ayurveda website and I designed and developed few pages in
the website which is described in this report. Then we updated our company websites into new
look. The report shows how php and html codes used in the site. Also this report contains about
Hotel reservation website which is under development that I explained briefly in this report.















Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 4

INDEX
CONTENTS PAGE NO.
1. INTRODUCTION 6
1.1 OVERALL DESCRIPTION 6
2. OVERALL PLANNING AND DESIGN 8
2.1 SITE MAP 8
2.1.1 SITE MAP FOR CHITHRAKOOTA AYURVEDA 8
2.1.2 SITE MAP FOR MAHODATI INFOTECH 9
2.1.3 SITE MAP FOR HOTEL BEENA 9
2.2 DATABASE DESIGN 11
3. IMPLEMENTATION 13
3.1 DEVELOPMENT OF AYURVEDA SITE 13
3.1.1 HOME PAGE CREATION 14
3.1.2 CONTACT US PAGE 15
3.1.3 OTHER PAGES OF CHITHRAKOOTA 17
3.2 MAHODATI INFOTECH WEB DEVELOPMENT 24
3.2.1 MAKING OF HOME PAGE 24
3.2.2 OTHER PAGES OF MAHODATI 25
3.3 HOTEL BEENA WEB DEVELOPMENT 33
4. TESTING OF THE WEBPAGE 36
4.1 TESTING OF THE WEBPAGE 36
4.2 PERFORMANCE TEST 36
5. SCRIPTING FOR WEBPAGES 37
5.1 SCRIPTING FOR MAPPING 37
5.2 SCRIPTING FOR BACKGROUND & MOVEMENT OF TEXTS 38
5.3 SCRIPT FOR SLIDE SHOW OF IMAGES 39
5.4 SCRIPT FOR ENQUIRY FORM 40
5.5 SCRIPT FOR SLIDE OF IMAGES IN MAHODATI WEBSITE 42
5.6 PHP SCRIPT FOR CONTACT FORM 44
5.7 PHP SCRIPT FOR SEARCHING CONTENT IN THE SITE 46
6. FUTURE WORK 49
7. REFERENCES 50
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 5

LIST OF FIGURES
FIG 2.1 CHITHRAKOOTA WEBSITE SITE MAP 8
FIG 2.2 MAHODATI INFOTECH SITE MAP 9
FIG 2.3 HOTEL RESERVATION SYSTEM SITE MAP 10
FIG 2.4 ADMIN PANEL FOR HOTEL RESERVATION SYSTEM 11
FIG 2.5 E-R DIAGRAM OF HOTEL BEENA DATABASE DESIGN 12
FIG 3.1 CHITHRAKOOTA AYURVEDA HOME PAGE 14
FIG 3.2 READ MORE PAGE OF CHITHRAKOOTA AYURVEDA 15
FIG 3.3 CONTACT US PAGE. 16
FIG 3.4 DIRECTION MAP 17
FIG 3.5 TOURISM PAGE 18
FIG 3.6 TREATMENT PAGE 19
FIG 3.7 ORGANIC FORM & HERBAL GARDEN PAGE 20
FIG 3.8 FACILITES PAGE 21
FIG 3.9 GALLERY OF IMAGES 22
FIG 3.10 ABOUT US PAGE 23
FIG 3.11 MAHODATI INDEX PAGE 24
FIG 3.12 WHY WE ARE DIFFERENT 25
FIG 3.13 HOW WE WORK 26
FIG 3.14 ABOUT US 27
FIG 3.15 CONTACT US PAGE 28
FIG 3.16 PRODUCTS OF THE COMPANY 29
FIG 3.17 SERVICES OF THE COMPANY 30
FIG 3.18 WHO WE ARE PAGE 31
FIG 3.19 WHAT WE VALUE 32
FIG 3.20 WHAT WE OFFER 33
FIG 3.21 HOTEL BEENA HOME PAGE 34
FIG 3.22 GALLERY PAGE 35
FIG 4.1 PERFORMANCE TEST 36


Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 6

CHAPTER 1
INTRODUCTION
Mahodati Infotech Services Pvt Ltd. is focused on becoming a leading software solutions
and Information Technology integration services provider, headquartered in Bengaluru in the India,
with regional offices in Kundapura Udupi. The Mahodati Infotech services and solutions are
tailored to help companies irrespective of their size become more efficient, profitable and effective
in their services delivery.
The Mahodati Infotech Service Pvt Ltd. is in designing, building and delivering IT
solutions, for small, mid-cap and large-cap clients. Today, information technology is moving away
from being a cost center to a tactical investment that is deeply tied to business strategies. Pacer
provides its customers with solutions that incorporate best-of-breed IT products and best-practice
IT solutions, practiced over years of experience with working with all kinds of customers. The
Company core competency lies in enabling organizations to realize the full potential of their IT
investments by building business value into technology solutions, and helping them to make the
critical connection between IT investments and business outcomes. The Company possess with the
latest technology to deliver excellent quality with TAT (turn-around time).

1.1 Overall Description:
The aim of this report is to explain the process of designing, building and testing of
websites.

The website called chithrakoota Ayurveda and the URL is:
http://www.chithrakoota.in/
The Company website which is called Mahodati Infotech and the URL is:
http://www.mahodati.com/

And the other website is Hotel Beena which is still under development.

The website Chithrakoota Ayurveda is based on the Ayurveda Hospital and it contains
about the organic form, Pharmacy and Images of website etc. The website was built by coding PHP
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 7

(Hypertext Preprocessor), HTML (Hypertext Markup Language), Javascript and CSS (Cascading
Style Sheets).
I worked on chithrakoota website for designing of the template, embedding the google maps
to the website, enquiry form creation, creating the slide show of images for the site, etc.
I worked on updating the company website and renewed all the pages with the new look.
This website contains Company information, Product Information, Services of the Company,
Career pages and Contact the Company pages. The website is developed using PHP, HTML,
Javascripts and Cascading style sheets.
The other website Hotel Beena is a Hotel Lodging site and it contains about the rooms,
Images, and online reservation of the site. The website was built by coding PHP (Hypertext Pre-
processor), HTML, JavaScript and CSS. In addition to this database developed in MySQL. This
website is still under development. So only few pages which are done are enclosed in this report.
















Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 8

CHAPTER 2
OVERALL PLAN AND DESIGN
2.1 SITE MAP:
The first step after deciding the website is the site map of the project. It describes all the
pages of website, link to each pages and database to the site.

2.1.1 SITE MAP FOR CHITHRAKOOTA AYURVEDA
The first site map describes the pages, link to the chithrakoota website. According to this
site map home page has the connection to every other main pages. And each page has the link that
goes back to the home page. Even the main page has the option to goto the other main page without
going to the home page.
















Fig. 2.1 Chithrakoota Website Site Map




H Ho om me e
About US Gallery Facilities
Organic form &
Herbal Garden
Organic form &
Herbal garden
Facility
page
Photo
Gallery
About
Chithrakoota
More about
Organic form &
Herbal garden
More about
Facilities
More about
chithrakoota
Contact US
Treatment Tourism
Offered
Treatments
Nearest
Places
Enquiry form
Name

Email

Subject

Message
Direction Map
Contact
Address
More about
Treatments
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 9

2.1.2 SITE MAP FOR MAHODATI INFOTECH
The Mahodati Infotech site map shows the connections to every page. Here in every page it
has the link to each page. The home page is the index page which is the main page of the website.
Here we have made one set of connections in the horizontal row, i.e. why we are different, how we
work, about us and contact us pages and other in vertical i.e. Products, services, clients and career
page.




















Fig 2.2 Mahodati Infotech site map

2.1.3 SITE MAP FOR HOTEL BEENA
The Next figure describes the site map for hotel Beena. In this website the database is
required for the website and the database developed using Mysql.
Home
Why we are
Different
How we
work
About us Contact us
Products Services
Client Career
Billing Software
Pay role & HRMS
Tax Suite
School Mgt System
Hospital Mgt System
CRM
Software Development
E-Publication
Web Design
Business App Services
HRM Solutions
Data Management
System & Tech Support

Who we are
What we value
What we offer
Current Openings
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 10

The site map shows the link for each other web pages. When the link goes for booking the
checkin date, checkout date and total number of required rooms will goto the server and search for
the availability in the database and produces output of available rooms, room type and price per
room for the dates which are requested. If the customer does the booking then the information of
the guest and number of days staying in the hotel are stored in the database. Then the link goes to
the payment options and here we have given it to the paypal account. So once payment is done the
room will be blocked to the customer and updates simultaneously in the database.
















Fig. 2.3 Hotel Reservation System Site Map
The next figure describes admin panel for the hotel Beena. Here the admin has the full
options to view the booking report, manage booking, can make changes in the room price, block the
rooms, update room types and modify the number of rooms etc.
H Ho om me e
Gallery Services Restaurant
Contact US Booking
More photo
Gallery
About the
restaurant
shivani
veg
Room
Search
Address

Services
Page
Room
Availability
Customer
details
form
Payment
gateway
Booking
Confirmation
Location
map
Enquiry
Form
Name
Contact
Subject
Message
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 11
















Fig 2.4 Admin Panel for Hotel Reservation System
2.2 DATABASE DESIGN:
The E-R Diagram of Hotel Beena database design represents the number of database tables
and rows of the website. Here in the first table Guest, the primary key we have given is LoginID.
In the Rooms table the primary key we have given is Number and in the Reservations table we have
given is ResNumber.
The figure 2.5 describes the E- R diagram for the Hotel Beena website.

Admin Login
Admin
Home
Hotel Details
Hotel Manager Booking List
Price plan
Manager
Price Manager
Customer
Lookup
Room & Room
Type Manager
View booking
list
Room Blocking
Calendar View
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 12



Fig 2.5 E-R Diagram of Hotel beena database design






Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 13

CHAPTER 3
IMPLEMENTATION

3.1 DEVELOPMENT OF AYURVEDA SITE:

3.1.1 HOME PAGE CREATION:
The design and development of home page is very important in every website. It should
attract the user in the first look. Here in the chithrakoota is a ayurvedic website, so to attract the
customers easily we have designed the website such a way that by looking at the theme they should
come to know it is pure Ayurveda. We have given ancient wooden look for this website.
The main attraction of any website is the photos and videos. So here we used slideshow of
images of Ayurveda medicines and treatment styles.
This theme designed using photoshop, we have collected ancient wood pictures and edited
to suite into the website. This work takes long time rather than writing code to it. The below figure
3.1 is the snapshot of the home page of the chithrakoota site.
Once the Home page attracts the customer then they look for more pages of a website to
find more information. So again we continued with the ancient look for every page. We have
developed these pages with the help of dreamweaver and Notepad++. The next figure describes the
read more page which continues from Home page, which tells completely about Ayurveda.

Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 14


Fig. 3.1 Chithrakoota Ayurveda Home page


Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 15


Fig 3.2 Read more page of chithrakoota Ayurveda
3.1.2 CONTACT US PAGE:
The next page I developed is the contactus page. In this page I highlighted the Contact
person name, address, e -mail and phone number of the person. To make it different from other
things I used leaf structure to highlight it. Then I have given link to other pages like enquiry and
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 16

direction map page. In the enquiry page I have given mail sending options for the customer directly
to the doctor. The figure 3.3 describes completely about the Contact us and enquiry form.


Fig 3.3 Contact us page.
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 17

In the direction map page I have embedded the google map into the website which I created.
Here first I added the hospital place into the google maps then after I took the longitude and latitude
of the place. By using the longitude and latitude of the place we can describe where exactly the
place comes. The figure 3.4 describes more about the direction map.

Fig. 3.4 Direction map
3.1.3 OTHER PAGES OF CHITHRAKOOTA
The figures 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 represents tourism places near chithrakoota,
Treatment in chithrakoota, Organic form and herbal garden of chithrakoota, facilities of
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 18

chithrakoota, Image gallery and about us page respectively. In the all these pages we maintained
ancient wooden look to represent Ayurveda.


Fig 3.5 Tourism page

Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 19

Fig 3.6 Treatment page
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 20


Fig 3.7 Organic form & Herbal Garden Page
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 21


Fig 3.8 Facilites Page
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 22


Fig 3.9 Gallery Of Images
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 23


Fig 3.10 About us page
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 24

3.2 MAHODATI INFOTECH WEB DEVELOPMENT:
3.2.1 MAKING OF HOME PAGE:
The Home page is the index page of the website and is the 1
st
attraction for any site. So we
designed mahodati.com home page very attractive, Informative and simple. The main attraction of
the page is the slide show of pictures. So we put the picture slides into centre of the page so that the
customer who visits the sites will get the best impression on that. Then we put information about
the company which is very informative to the customer. The template we selected for this site is
very simple and this contains very less in size so that the browsing to the pages are faster. The
figure below represents the index page of the site.

Fig 3.11 Mahodati Index page


Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 25

3.2.2 OTHER PAGES OF MAHODATI
The next page is the Why we are different page, here it contains slide images and the texts
containing the reasons for why the company is different. In the bottom of every page we have given
link to facebook, twitter and linkedin accounts. The figure 3.12 shows the why we are different
page.

Fig.3.12 why we are different
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 26

The next page is how we work page. It contains how mahodati works and appreciations
given by clients. The figure 3.13 represents how we work page.


Fig 3.13 how we work
In the pages of mahodati website we have written separate header and footer codes. So by
calling header.php and footer.php in any page we can include header and footer. The use of this
technique is no need to modify header and footer in every page. The figure 3.14 represents about us
page.
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 27


Fig 3.14 about us
The next page is the contact us page. In this page the customer can contact the company by
submitting form. It contains PHP codes that send email to the company manager. The text box field
contains company name, Full name, E-mail Id of the customer, Subject and message body. The
figure 3.15 represents contact us page.
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 28


Fig 3.15 Contact us page
The next figures 3.16, 3.17, 3.18, 3.19 and 3.20 shows about the products of the company,
Services of the company, who we are which is related to career page, what we value and what we
offer page respectively.
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 29


Fig 3.16 Products of the company
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 30


Fig 3.17 Services of the company
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 31


Fig 3.18 who we are page
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 32


Fig 3.19 what we value
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 33


Fig 3.20 What we offer

3.3 HOTEL BEENA WEB DEVELOPMENT:
The pages of Hotel Beena designing and developing in such a way that tourist should
attracted to the hotel. We have placed best photos of the hotel that describes the neatness of the
hotel and facilities of the hotel. So that the tourist finds this hotel best one than other. The
Speciality of this website is we are developing online reservation system to this website, so that the
tourist has no tension of finding rooms after coming to the place. Here we are using paypal account
for the money transaction process. It is very is easy and secured compare to any other way. The
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 34

figure 3.21 describes the home page of hotel beena. The figure 3.22 describes the Galary page
where the tourist finds more photos of the hotel.


Fig 3.21 Hotel beena Home page
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 35


Fig 3.22 Gallery Page








Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 36

CHAPTER 4
TESTING OF THE WEBPAGE

4.1 TESTING OF WEBPAGE
Once we developed the webpage then we go for testing of web page in any browser. If the
webpages looks perfect then we go for testing of links which we have given in the website. If that
links works perfect then we try in browser to check is it working same like the previous.
We mainly Test the page in Google chrome, Mozilla firefox and Internet explorer as the
most of the people uses only these browsers.

4.2 PERFORMANCE TEST
In this performance test we use the online free tools for testing the speed of the website.
There are lot of free tools available online. We use pingdom tool & kite tool to test the performance
of the pages. The figure 4.1 shows a sample snapshot of performance testing of mail.php page of
chithrakoota site.
Fig 4.1 Performance test
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 37

CHAPTER 5
SCRIPTING FOR WEBPAGES

Although I cannot able to put all the codes I have added few important scripts that I used in
my website. That works for the specific tasks in the website.
5.1 SCRIPT FOR MAPPING:
<!DOCTYPE html>
<html>
<head>
<script
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&s
ensor=false">
</script>

<script>
var myCenter=new google.maps.LatLng(13.736008,74.746749);

function initialize()
{
var mapProp = {
center:myCenter,
zoom:14,
mapTypeId:google.maps.MapTypeId.ROADMAP
};

var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);

var marker=new google.maps.Marker({
position:myCenter,
});

marker.setMap(map);
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 38

}

google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>

<body>
<div id="googleMap" style="width:650px;height:500px;"></div>
</body>
</html>

5.2 SCRIPTING FOR BACKGROUND AND MOVEMENT OF TEXTS IN
THE WEB PAGE

<div id="Panel1" class="style1">
<img id="Image1" class="style2" src="images/homefinalnew.png" />
</div>
<div id="Panel7" style="top: 299px; left: 1032px; position: absolute; height: 279px; width:173px">
<font color="yellow"><u><b> We Treat Successfully.</b></u></font>
marquee behavior ="scroll" direction ="up" scrolldelay= "250" loop="1000">
<font color="green" face="impact" size="5">Headache<br/><br/>
Hypertension <br/><br/>
Insomnia <br/><br/>
Skin diseases <br/><br/>
Backpain <br/><br/>
Diabetes <br/><br/>
Gasteritics<br/><br/>
Joint Pain<br/><br/>
</font>
</marquee>
</div>


Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 39

5.3 SCRIPT FOR SLIDE SHOW OF IMAGES

<div id="Panel4" class="style32">

<ul class="ppt">
<li> <img src="slide/f2.png" alt="one" class="style33"/></li>
<li> <img alt="two" src="slide/f1.png" class="style37" /></li>
<li> <img alt="three" src="slide/f3.png" class="style37" /></li>
<li> <img src="slide/f5.png" alt="one" class="style33"/></li>
<li> <img alt="two" src="slide/f4.png" class="style37" /></li>
<li> <img alt="three" src="slide/f6.png" class="style37" /></li>
<li> <img src="slide/f7.png" alt="one" class="style33"/></li>
<li> <img alt="two" src="slide/f8.png" class="style37" /></li>
<li> <img alt="three" src="slide/f9.png" class="style37" /></li>
<li> <img alt="three" src="slide/f10.png" class="style37" /></li>

</ul>

<script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript">

$('.ppt li:gt(0)').hide();
$('.ppt li:last').addClass('last');
var cur = $('.ppt li:first');

function animate() {
cur.fadeOut(5000);
if (cur.attr('class') == 'last')
cur = $('.ppt li:first');
else
cur = cur.next();
cur.fadeIn(3000);
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 40

}

$(function () {
setInterval("animate()", 5000);
});
</script>
</div>

5.4 SCRIPT FOR ENQUIRY FORM

<script type="text/javascript">
function validate_form(frm1)
{
with(frm1)
{
flag=0;
with(from)
{

var from = document.getElementById('from');
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

if (!filter.test(from.value))
{

alert("please enter valid email");

from.focus();

flag=1;
}
}
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 41

}
}
<form method="POST" action="#" id="form1" enctype="multipart/form-data" onsubmit="return
validate_form(this)">
<div id="Panel7" style="top: 955px; left: 44px; position: absolute; height: 309px; width:
343px">
<table style=" border:1px solid" align="center">
<tr>
<td colspan="2" align="center" bgcolor="White">
<b>Send Query</b>
</td>
</tr>
<tr>
<td style="color: #CC9900">
Name:
</td>
<td>
<input name="name" type="text" id="TextBox1" />
</td>
</tr>
<tr>
<td style="color: #CC9900">
Your EMail:
</td>
<td>
<input name="from" id="from" type="text" id="TextBox2" />
</td>
</tr>

<tr>
<td style="color: #CC9900">
Subject:
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 42

</td>
<td>
<input name="subject" type="text" id="TextBox3" />
</td>
</tr>
<tr>
<td valign="top" style="color: #CC9900">
Body:
</td>
<td>
<textarea name="body" rows="10" cols="30" id="TextBox4">
</textarea>

</td>
</tr>
<tr>

<td><input type="submit" name="send" value="Send" id="Button1" /> </td>
</tr>
<p style="color:green;"></p>
</table>
</div>

5.5 SCRIPT FOR SLIDE OF IMAGES IN MAHODATI WEBSITE
<div id="slides">
<div class="slides_container">
<div class="slide">
<a href="y_v_r_diff.php" title="WHY WE ARE DIFFERENT"
target="_blank"><img src="img/slide-99.jpg" width="570" height="270" alt="Slide
1"></a>
<div class="caption" style="bottom:0">
<p>" INNOVATIVE THINKING FOR GLOBAL PERSPECTIVE "</p>
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 43

</div>
</div>
<div class="slide">
<a href="h_v_work.php" title="HOW WE WORK" target="_blank"><img
src="img/slide-44.jpg" width="570" height="270" alt="Slide 4"/></a>
<div class="caption">
<p>" CHANGE FOR BETTER "</p>
</div>
</div>
<div class="slide">
<a href="" title="WEB DISIGN" target="_blank"><img src="img/kh.bmp" width="570"
height="270" alt="Slide 2"></a>
<div class="caption">
<p>" WE DO EVERYBODY can't " </p>
</div>
</div>
<div class="slide">
<a href="abt_us.php" title="ABOUT US" target="_blank"><img src="img/slide-88.jpg"
width="570" height="270" alt="Slide 3"/></a>
<div class="caption">
<p> " KNOWLEDGE, EXCELLENCE, INTEGRITY, DEDICATION, RELIABILITY "</p>
</div>
</div>

<div class="slide">
<a href="products.php" title="OUR PRODUCTS" target="_blank"><img
src="img/abtus.jpg" width="570" height="270" alt="Slide 5"></a>
<div class="caption">
<p>" DELIVERING BUSINESS SOLUTION WITH TECHNOLOGY "</p>
</div>
</div>
<div class="slide">
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 44

<a href="service.php" title="OUR SERVICES" target="_blank"> <img src="img/slide-
66.png" width="570" height="270" alt="Slide 6"></a>
<div class="caption">
<p>" at SIMPLIFi WE LIKE TO KEEP OUR CUSTOMER hAPPY "</p>
</div>
</div>
<div class="slide">
<a href="career.php" title="CAREER OFFERS" target="_blank"><img
src="img/career.jpg" width="570" height="270" alt="Slide 7"></a>
<div class="caption">
<p>" EXPLORE YOUR CAPABILITIES WITH US "</p>
</div>
</div>

</div>
<a href="#" class="prev"><img src="img/arrow-prev.png" width="24" height="43"
alt="Arrow Prev"></a>
<a href="#" class="next"><img src="img/arrow-next.png" width="24" height="43"
alt="Arrow Next"></a>
</div>
<img src="img/example-frame.png" width="739" height="341" alt="Example Frame"
id="frame">
</div>

</div>

</div>

5.6 PHP SCRIPT FOR CONTACT FORM
<?php
$err="";
if(isset($_POST['submit']))
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 45

{

$to = "rj@mahodati.com";
$subject=$_POST['sub'];
$message=$_POST['help'];
$name=$_POST['compname'];
$from=$_POST['email'];

$headers = "From:" . $from;

$val=mail($to,$subject,$message,$headers);

if( $val == true )
{
$err= "Message sent successfully...";
}

}

else
{
$err= "Message could not be sent...";
}
?>

<div id="content2">
<h1>Contact Us</h1>
<p>Please complete the information below and click 'Submit' to have our representative
contact you promptly</p>



Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 46

<form id="form1" method="POST" action="#" enctype="multipart/form-data" >
Company Name<br>
<input size="30" name="compname" type="text"/>
<br><br>
Full Name<br>
<input size="30" name="fullname" id="fullname" type="text"/>
<br><br>
Email Address<br>
<input size="30" name="email" id="email" type="text"/>
<br><br>
Subject<br>
<input size="30" name="sub" id="sub" type="text">
<br><br>
How Mahodati can help you<br>
<textarea rows="5" cols="30" name="help"></textarea>
<br><br>

<input type="submit" id="submit" name="submit" value="Submit"/>
<center><p style="color:green;"><?php echo $err; ?></p></center>
<br><br><br>
</form>
</div>

5.7 PHP SCRIPT FOR SEARCHING CONTENT IN THE SITE
<?php
$err="";
$textboxdata = $_POST['txtsearch'];

if (isset($_POST['submit'])) {
switch ($textboxdata)
{
case home:
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 47

header("Location: index.php");
break;
case about :
header("Location: abt_us.php");
break;
case contact:
header("Location: cont_us.php");
break;
case products:
header("Location: Products.php");
break;
case product:
header("Location: Products.php");
break;
case services:
header("Location: service.php");
break;
case service:
header("Location: service.php");
break;
case careers:
header("Location: career.php");
break;
case career:
header("Location: career.php");
break;
case client:
header("Location: client.php");
break;
case mahodati:
header("Location: y_v_r_diff.php");
break;
Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 48

case howvwork:
header("Location: h_v_work.php");
break;
case openings:
header("Location: career.php");
break;
case currentpenings:
header("Location: career.php");
break;

default:
header("Location:index.php");
echo "wrong input";
break;
}
}












Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 49

FUTURE WORK

The Hotel beena is still under development because of the database and security reasons.
We are developing this website with sign in availability for each customer. So that the customers
details will be stored in the database and can do booking multiple times easily by just signing in.
And it is more secured for the transactions of amounts so that the customer has no worries about
transaction failures.





















Web Development Using PHP and HTML Deepaka Srirama Bairy

ESIGELEC, ROUEN Page 50

REFERENCES

1. http://www.w3schools.com/googleAPI/default.asp
2. http://www.w3schools.com/php/default.asp
3. http://tools.pingdom.com/fpt/
4. http://www.tizag.com/htmlT/script.php
5. http://www.echoecho.com/javascript.htm
6. http://www.mahodati.com/
7. http://www.chithrakoota.in/

Вам также может понравиться