-
Notifications
You must be signed in to change notification settings - Fork 4
/
pro_browser.php
32 lines (29 loc) · 1.14 KB
/
pro_browser.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
echo "<table width='1000' border=1 align=center>";
echo "<tr>";
echo "<td width=200><b><center>Productid</center></b></td>";
echo "<td width=200><b><center>Name</center></b></td>";
echo "<td width=200><b><center>Author</center></b></td>";
echo "<td width=200><b><center>Description</center></b></td>";
echo "<td width=200><b><center>Price</center></b></td>";
echo "<td width=100><b><center>Category</center></b></td>";
echo "</tr>";
$conn=mysql_connect("localhost","root","101389");
mysql_select_db("books",$conn);
$sql="select * from products";
$result=mysql_query($sql)or die("failed".mysql_error());
while($row=mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>".$row["productid"]."</td>";
echo "<td>".$row["name"]."</td>";
echo "<td>".$row["author"]."</td>";
echo "<td>".$row["description"]."</td>";
echo "<td>".$row["price"]."</td>";
echo "<td>".$row["category"]."</td></tr>";
}
echo "</table><br><br>";
echo "<p><center>";
echo "If you want to Admin Page<br><br>";
echo "<a href='admin.php'>Click Here</a></center></p>";
?>