<?php
session_start();
?>
<html>
<head>
<title>Car Rentals & Returns</title>
<meta http-equiv="Content-Type" content="text/html" />
<link href="style2.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper3">
<img src="images/cars.jpg" width="996" height="100"></a>
<TABLE BGCOLOR="#F0F8FF" BORDER=0 CELLPADDING=10 WIDTH=100%>
<tr>
<td align="center">
<H1>Search Results:</H1>
<form action="edit_emp.php" method="post">
</td>
</table>
<TABLE BGCOLOR="#F0F8FF" BORDER=0 CELLPADDING=10 WIDTH=30%>
<tr>
<TD ALIGN=CENTER VALIGN=TOP WIDTH=50>
</TD>
<TD ALIGN=LEFT VALIGN=TOP WIDTH=83%>
<TR><TD>
<?php
$_SESSION['result'] = "$result";
ini_set( 'display_errors', '1' );
error_reporting ( 2047 );
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="root"; // Mysql password
$db_name="test"; // Database name
$tbl_name="members"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "root", "root")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$row = mysql_fetch_array($_SESSION['members']);
echo "<table border=\"1\" align=\"center\">";
echo "<tr><th>First Name</th>";
echo "<td>";
echo '<input type="text" name="firstname" value="'. $row['Firstname'] .'" size="20" />';
echo "</td>";
echo "<tr><th>Surname</th>";
echo "<td>";
echo '<input type="text" name="surname" value="'. $row['Surname'] .'" size="20" />';
echo "</td>";
echo "<tr><th>Username</th>";
echo "<td>";
echo '<input type="text" name="username" value="'. $row['username'] .'" size="20" />';
echo "</td>";
echo "<tr><th>Password</th>";
echo "<td>";
echo '<input type="text" name="password" value="'. $row['password'] .'" size="20" />';;
echo "</td>";
echo "<tr><th>Email</th>";
echo "<td>";
echo '<input type="text" name="email" value="'. $row['email'] .'" size="20" />';
echo "</td>";
echo "<tr><th>Level</th>";
echo "<td>";
echo '<input type="text" name="level" value="'. $row['level'] .'" size="20" />';
echo "</td>";
exit();
?>
<TABLE BGCOLOR="#F0F8FF" BORDER=0 CELLPADDING=10 WIDTH=100%>
<tr>
<input type="submit" value="Update Details"/>
</form>
<form method="post" action="login_success3.php">
<td align="center"><input type="submit" value="Home"/></form>
</td>
</tr>
</table>
</table>
</td>
</tr>
</table>
</BODY>
</HTML>