0% found this document useful (0 votes)
3 views

SampleCode

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

SampleCode

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

ADMIN LOGIN

<html>

<head><link rel="stylesheet" type="text/css" href="styles.css"></link>


</head>
<body bgcolor="White" text="blue">
<?php
include('pagetop.php');
?>
<?php
include('menugeneraltop.php');
?>
<center>
<h1 align="center">ADMINISTRATOR LOGIN FORM</h1>
</center>
<center>
<table width="800"><tr>
<td>

<form action="AdminLoginCheck.php" method="POST">


<table align="center" border="1">
<tr>

<td>UserName<td><input name="txtUser">
<tr>
<td >Admin Password<td><input type="password"
name="txtPass">
<tr>
<td colspan="2" align="center"><input type="submit"
value="Admin Login">
</table>
</form>
</td></tr></table>
</center>
<body>
</html>
ADD CAR OWNER

<?php
$con = mysql_connect("localhost","root",'');
mysql_select_db("carpolling", $con);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>
<html>
<head><link rel="stylesheet" type="text/css" href="styles.css"></link>
</head>
<body>
<table border="0" width="100%">
<tr>
<td><?php include('pagetop.php')?>
<?php include('menugeneraltop.php')?>
</td>
</tr>
</table>

<table width="100%">
<tr><td>
<?php include('menutable.php') ?>
</td><td align="center">
<h1 align="center"><font face="TAHOMA" >Add CarOwner Details</font></h1>

<form action="savecarowner.php" method="post">


<table align="center" width="500">
<tr>
<td align="right">CarOwner Id

<td><?php

$sql="select count(*) as Records from


carowner" ;
$res=mysql_query($sql,$con) or
die(mysql_error());
$row = mysql_fetch_array($res);

$RecNo=($row['Records']+1);

?>

<input name="txtcarownerId" value='<?php echo $RecNo ?>'>


</tr> <tr>
<td
align="right">CarOwner Name
<td><input name="txtcarownerName">
</tr>
<td
align="right">Street
<td><input name="txtStreet">
</tr>
<tr>
<td align="right">Address
<td><textarea name="txtAddress" value=''></textarea>
</tr>
<tr>
<td align="right">City
<td><input name="txtCity">
</tr><tr>
<td align="right">PinCode
<td><input name="txtPin">
</tr><tr>
<td align="right">Phone
<td><input name="txtPhone">
</tr><tr>
<td align="right">Mobile
<td><input name="txtMobile">
</tr><tr>
<td align="right">E-Mail Id
<td><input name="txtMail">
</tr>
<tr>
<td align="right">Password
<td><input type="password" name="txtPass">
</tr>
<tr>
<td align="center" colspan=2><input type="submit"
value="Save">
<input type="reset" value="Clear"></td>
</tr>
</table>
</form>
</td></tr></table>
</body>
</html>
ADD VEHICLE

<?php
$con = mysql_connect("localhost","root",'');
mysql_select_db("carpolling", $con);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>
<html>
<head><link rel="stylesheet" type="text/css" href="styles.css"></link>
</head>
<body>
<table border="0" width="100%">
<tr>
<td><?php include('pagetop.php')?>
<?php include('menugeneraltop.php')?>
</td>
</tr>
</table>

<table width="100%">
<tr><td>
<?php include('menutable.php') ?>
</td>
<td align="center">
<h2 align="center"><font face="TAHOMA" color="RED ">VEHICLE
ENTRY</font></h2>

<form action="savevehicle.php" method="post">


<table align="center" width="500">
<tr>
<td align="right">Vehicle Id
<?php

$sql="select count(*) as Records from


vehicle";
$res=mysql_query($sql,$con) or
die(mysql_error());
$row = mysql_fetch_array($res);

$RecNo=$row['Records']+1;

?>
<td><input name="txtVehicleId" value='<?php echo
$RecNo ?>'>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td align="right">Vehicle Name
<td><input name="txtVehicleName">
</tr>
<tr>
<td align="right">Year Of Make
<td><input name="txtYear">
</tr>

<tr>
<td align="right">No. of Seats
<td><input name="txtSeats">
</tr>
<tr>
<td align="right">Owner
</td>
<td>
<select name="cboOwnerId">
<?php
$sql="SELECT OwnerId FROM
CarOwner";

$tot=mysql_query($sql,$con);

while($row = mysql_fetch_array($tot) )
{

echo "<option>" .
$row['OwnerId'] . "</option>";

}
?>
</SELECT>
</td>
</tr>

<tr>
<td align="center" colspan=2><input type="submit"
value="Save">
<input type="reset" value="Clear"></td>
</tr>
</table>
</form>
</td></tr></table>
</body>
</html>

You might also like