data retrieve help

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

petro
New php-forum User
New php-forum User
Posts: 3
Joined: Mon Feb 04, 2013 6:26 am

data retrieve help

Postby petro » Wed Feb 13, 2013 2:15 am

i have written some codes here below. i want more help admin is able to view all reports(complains) from the database after then admin can work to solve them now i want to put a link that will show which reports (complais) are solved -completed and which are not solved-incomplete.
<?php
session_start()
?>
<?php
require("connect_database.php");
if(!con)
echo "Database not connected:";

//declaring variables...
$building_name=$_POST['building_name'];
$room_number=$_POST['room_number'];
$report_id=$_POST['report_id'];
$registration_number=$_POST['registration_number'];

//retrieving reports from database..
$query="SELECT building_name,room_number,report_id,registration_number FROM report";
$result=mysql_query($query);

echo"<table width='90%' align='center'>";
echo"<tr><th><em>Building Name:</em></th><th><em>Room Name:</em></th><th><em>Report ID:</em></th><th><em>User ID:</em></th></tr>";

while($row=mysql_fetch_array($result))
{
echo "<tr><td align='center'>".$row['building_name']."</td><td align='center'>".$row['room_number']."</td><td align='center'>".$row['report_id']."</td><td align='center'>".$row['registration_number']."</td></tr>";
}
echo"</table>";
?>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="admin_logged_in.php"/></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>ADMIN HOME PAGE</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="admin_logout.php">LOG OUT</a>
</p>
</div>
?>

Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest