Viewing file: idbranch2.php (1.87 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include('session.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Student Search </title> </head> <center> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC"> <tr> <td colspan="4" bgcolor="#FFFF00"><?php include('header.php'); ?></td> </tr> <tr> <td bgcolor="#6699CC">Welcome <?php echo $user ?></td> <td bgcolor="#6699CC"><a href="logout.php">Logout</a></td> <td bgcolor="#6699CC"><?php echo "Today is " . date("d/m/y") . "<br>";?></td> </tr> <tr> <td colspan="4" bgcolor="#FFFF00"><?php include('menubar.php'); ?></td> </tr> </table> <form action="allrecords.php" method="get" name="form"> <table width="100%" border="1" cellspacing="1" cellpadding="1"> <tr align="left" width="100"> <td width="79" bgcolor="#FFCC00"></td> <td width="139" bgcolor="#FFCC00"> <?php // Create connection $con=mysqli_connect("localhost","mitm_user","mitmpass838","mitm_ailwssor_database");
// Check connection if (mysqli_connect_errno())
// Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else { echo "We are connected."; }
$result = mysqli_query($con,"SELECT ID, username FROM branchlogin ");
?> <select name="q" id="q" > <? while($row = mysqli_fetch_array($result)) { echo "<option value='" . $row['username'] . "'>" . $row['username'] . "</option>"; } ?> </select></td> <td width="255" bgcolor="#FFCC00"> </td> <td width="415" bgcolor="#FFCC00"><input type="submit" name="Submit" value="Search" /></td> </tr> </table> </form>
</body></center> </html>
|