Professional Documents
Culture Documents
Project Report
Project Report
PROJECT OBJECTIVE
NAME OF THE PROJECTIVE:TOURIST GUIDE
LOGIN PAGE
MAIN PAGE
PLACES PAGE
Register.php
<html>
<head>
<title>REGISTRATION</title>
<script language="javascript" type="text/javascript">
function validate2()
{
var username=document.reg.username.value;
var rpass=document.reg.rpass.value;
if(username=="")
{
alert("Username is mandatory!");
return(False);
}
else if(rpass=="")
{
alert("Password is mandatory!");
return(False);
}
else if(rpass.length<5)
{
alert("Password should consist of atleast 5
characters!");
return(False);
}
else
{
return(True);
}
}
</script>
<body background="hist.JPG">
<CENTER>
<FONT color="#C711585" face="Tw Cen MT" size=6>
<H1><B>REGISTRATION FORM<B></H1>
<br>
<?php
if($_SERVER["REQUEST_METHOD"]=="POST")
{
$rname=$_POST["username"];
$rpass=$_POST["rpass"];
$myquery="INSERT INTO user_list VALUES('".
$rname."','".$rpass."');";
$conn=mysqli_connect("localhost","root","","indian");
if(!(mysqli_connect_error($conn)))
{
$res=mysqli_query($conn,$myquery);
if($res!=FALSE)
header("location:login.php");
}
?>
<form method="POST" name="reg"
Onsubmit="validate2()">
<TABLE CELLSPACING=1>
<TR><th></th><TH>NAME</TH><TH><INPUT
TYPE="TEXT"
NAME="rname"><tr></TH><TH></TH><TH>USERNAM
E</TH><TH><INPUT TYPE="TEXT"
NAME="username"></TH></tr>
<TR><TH></TH><TH>PASSWORD</TH><TH><INPUT
TYPE="PASSWORD" NAME="rpass"></TH></TR>
<TR><TH></TH><TH>GENDER</TH><TD>MALE</TD><T
H><INPUT TYPE="RADIO" NAME="gender"
value="male"></TH><TD>FEMALE</TD><TH><INPUT
TYPE="RADIO" NAME="gender"
value="female"></TH></TR>
<TR><TH>INTRESTS :</TH><TD>INDIAN
HISTORY</TD><TH><INPUT TYPE="checkbox"
NAME="hobbie" value="HISTORY">
<TD>INDIAN POLITICS</TD><TH><INPUT
TYPE="checkbox" NAME="hobbie"
value="POLITICS"></TH>
<TD>INDIAN GEOGRAPHY</TD><TH><INPUT
TYPE="checkbox" NAME="hobbie"
value="GEOGRAPHY"></TH>
</TH></TR>
<TR><th></th><th>LANGUAGE</th><th>
<select name=language>
<option value="english" selected>ENGLISH</option>
<option>HINDI</option>
<option>OTHER</option>
</select></th></TR>
<TR><th></th><th>ADDITIONAL
COMMENTS</th><th><TEXTAREA ROWS=10 COLS=20
NAME="comments"></textarea></th></TR>
<TR><TH></TH><TH><input type="submit"
value="REGISTER"><TH></TH></TH><TH><INPUT
TYPE="RESET" VALUE="RESET"></TH></TR>
</TABLE>
</form>
</FONT>
</CENTER>
</body>
</html>
LOGIN.php
<html>
<head>
<style>
h2
{
font-family:Copperplate Gothic;
color:#E6E6FA;
}
</style>
<script language="javascript" type="text/javascript">
function validate()
{
var user=document.loginform.username.value;
var pass=document.loginform.pass.value
if(user=="" || pass=="")
{
alert("FIELDS ARE EMPTY!");
return(False);
}
else
{
return(True);
}
}
</script>
<?php
session_start();
?>
<title>LOGIN PAGE</title>
<body background="night.JPG">
<?php
if($_SERVER["REQUEST_METHOD"]=="POST")
{
$connection= new
mysqli("localhost","root","","indian");
$user=$_POST["username"];
$pass=$_POST["pass"];
$myquery="SELECT * FROM user_list;";
$result_object=$connection->query($myquery);
$f=0;
for($i=0;$i<$result_object->num_rows;$i++)
{
$result_object->data_seek($i);
$row=$result_object->fetch_array(MYSQLI_NUM);
if($user==$row[0]&&$pass==$row[1])
{
$_SESSION["f"]=1;
break;
}
}
if(isset($_SESSION["f"]) && $_SESSION["f"]==1)
{
header("location:main.php");
}
else
{
echo"<center><h2>INVALID DATA...<h2></center>";
}
}
?>
<CENTER>
<FONT color="#C711585" face="Tw Cen MT" size=6>
<h2>TOURIST GUIDE</h2>
<H1><B>LOGIN<B></H1>
<br>
<form name="loginform" method="POST"
Onsubmit="validate()">
<TABLE CELLSPACING=8>
<TR><TH>USERNAME</TH><TH><INPUT TYPE="TEXT"
NAME="username"></TH></TR>
<TR><TH>PASSWORD</TH><TH><INPUT
TYPE="PASSWORD" NAME="pass"></TH></TR>
<TR><TH><input type="submit"
value="LOGIN"><TH></TH></TH><TH><INPUT
TYPE="RESET" VALUE="RESET"></TH></TR>
</TABLE>
</form>
</FONT>
<br><br><br><br><br><br><br><br><br><br>
<strong><font size=5><A href="register.php"><b>New
User?Please Register</b></A></font></strong>
</CENTER>
</body>
</html>
Main.php
<html>
<head>
<?php
session_start();
?>
<link rel="stylesheet" href="extcss.css">
<style>
body
{
background-color:#ADD8E6;
}
li
{
background-color: white;
}
.any
{
background-color: #CCCCFF;
}
#mybody
{
background-color:white;
padding: 10px;
text-align: center;
}
</style>
<title>MAIN PAGE</title>
</head>
<body>
<?php
if(!(isset($_SESSION["f"])))
{
header("location:login.php");
}
?>
<FONT color="#5F04B4" face="Tw Cen MT" size=5>
<FONT color="#FFFFFF" face="Tw Cen MT" size=6><h3
style="font-color:white;background-
color:orange;">NEWS CORNER</h3></font><hr
color="#FFFFFF" size=2>
<marquee style="background-color:green;>***<A
href="https://www.ndtv.com/india-news/now-us-
comic-trevor-noah-puts-indias-farmer-protest-on-
global-radar-2368319">
FARMER'S PROTEST</A>***<A
href="https://indianexpress.com/article/india/india-
china-lac-standoff-pangong-tso-disengagement-rahul-
gandhi-7185778/">
PANGONG IN CRITICAL SITUATION</A>***<A
href="https://www.hindustantimes.com/india-
news/india-sends-22-9-mn-doses-of-covid-19-vaccines-
to-20-countries-more-in-pipeline-
101613142400644.html">
INDIA SENDS COVID VACCIN</A>***<A
href="https://www.nytimes.com/2021/02/11/technolo
gy/twitter-vs-india.html">INDIA VS TWITTER</A>
</marquee>
<br><hr color="#FFFFFF" size=2>
<h2><u>INDIA-OVERVIEW</u></h2><img src="o.jfif"
align="right" valign="top" width=100
heigth=100>
<div class="any">
India , officially the Republic of India , is a country in
South Asia.<br>
It is the second-most populous country, the seventh-
largest country by land area, and the most populous
democracy in the world.<br>
Bounded by the Indian Ocean on the south, the
Arabian Sea on the southwest, and the Bay of Bengal
on the southeast, it
shares land borders with Pakistan to the west; China,
Nepal, and Bhutan to the north; and Bangladesh and
Myanmar to the east.<br>
In the Indian Ocean, India is in the vicinity of Sri Lanka
and the Maldives;
its Andaman and Nicobar Islands share a maritime
border with Thailand and Indonesia.<p>
India has been a secular federal republic since 1950,
governed in a democratic parliamentary system.
It is a pluralistic, multilingual and multi-ethnic society.
</p></div>
<img src="leaders.jfif" align=right
usemap="#leadersmap">
<map name="leadersmap">
<area shape="rect" coords="0,0,102,159"
href="https://en.wikipedia.org/wiki/Pranab_Mukherje
e">
<area shape="rect" coords="103,0,215,159"
href="https://en.wikipedia.org/wiki/Mohammad_Hami
d_Ansari">
<area shape="rect" coords="215,0,312,159"
href="https://en.wikipedia.org/wiki/Narendra_Modi">
</map>
<FONT color="#78281F" face="Tw Cen MT" size=5>
<h4>CLICK BELOW TO KNOW MORE</h4>
<ul cellspacing=5>
<li><A href="https://knowindia.gov.in/culture-and-
heritage/ancient-history.php#:~:text=India's%20history
%20and%20culture%20is,the%20southern%20lands
%20of%20India.&text=By%20the%20end%20of
%20the,region%20of%20highly%20developed
%20civilization.">INDIAN HISTORY</A></li>
<li><A
href="https://www.googleadservices.com/pagead/aclk
?
sa=L&ai=DChcSEwi21Jms6eTuAhXNqpYKHTpvDvwYAB
AAGgJ0bA&ae=2&ohost=www.google.com&cid=CAESQ
OD28Dfz-
CFhEKSO1lN7RmP2mIlZaCDo1rz6D8JZRNzPfua8-
8h46SV5pG6aSG9CvokHSs9jTACPUA1ObDI48yo&sig=A
OD64_0y9Ks8R-d-
OGnvXf3YZ5ozb5JwpQ&q&adurl&ved=2ahUKEwjF8oys
6eTuAhXY7HMBHcWPDxEQ0Qx6BAggEAE">INDIAN
POLITICS</A></li>
<li><A
href="https://en.wikipedia.org/wiki/Geography_of_Ind
ia">INDIAN GEOGRAPHY</A></li>
</ul>
</font>
</font>
<center>
<br><br><br>
<A href="states.html" id="mybody"> TOURIST
DESTINATIONS IN INDIA-CLICK HERE</A>
<br><br><br><br>
<FONT color="#78281F" face="Tw Cen MT" size=5>
<A href="logout.php">BACK TO HOME</A>
</font>
</center>
</body>
</html>
Places.php
<html>
<head>
<link rel="stylesheet" href="extcss.css">
<style>
#mybody
{
background-color:#ADD8E6;
padding: 10px;
text-align: center;
border: yellow 2px;
}
</style>
<title>MAIN PAGE</title>
</head>
<frameset cols="60%,*" noresize>
<frame src="second.html" id="mybody">
<frame id="mybody" name="targetframe">
</frameset>
</html>
second.html
<html>
<head><title>Login</title></head>
<body>
<img src="indiamap.jpg" usemap="#map1">
<map name="map1">
<area shape="circle" coords="178,401,5"
href="https://en.wikipedia.org/wiki/Rajasthan"
target="">
<area shape="circle" coords="535,507,5"
href="https://en.wikipedia.org/wiki/Jharkhand">
<area shape="circle" coords="446,536,5"
href="https://en.wikipedia.org/wiki/Chhattisgarh">
<area shape="circle" coords="535,571,5"
href="https://en.wikipedia.org/wiki/Odisha">
<area shape="circle" coords="363,669,5"
href="https://en.wikipedia.org/wiki/Telangana">
<area shape="circle" coords="370,743,5"
href="https://en.wikipedia.org/wiki/Andhra_Pradesh">
<area shape="circle" coords="257,787,5"
href="https://en.wikipedia.org/wiki/Bangalore">
<area shape="circle" coords="356,806,5"
href="https://en.wikipedia.org/wiki/Chennai">
</map>
</body>
</html>
Logout.php
<?php
session_start();
// Destroy session
if(session_destroy()) {
// Redirecting To Home Page
header("location:login.php");
}
?>