forked from yeghiakoronian/BuyACar-Ecommerce-Web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkCarID.php
66 lines (66 loc) · 1.07 KB
/
checkCarID.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
include 'core/init.php';
admin_protect();
?>
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
$conn = mysql_connect("localhost","root","");
if(!$conn)
{
echo mysql_error();
}
$db = mysql_select_db("lr",$conn);
if(!$db)
{
echo mysql_error();
}
$cno=$_POST['cno'];
$q="SELECT * FROM cardata WHERE cno='$cno'";
$r = mysql_query("$q",$conn);
if($r)
{
while($row=mysql_fetch_array($r))
{
$cname=$row['cname'];
$cdetails=$row['cdetails'];
$cprice=$row['cprice'];
echo "<table border=1, width='625'>";
echo "<tr>";
echo "<td width='125'>";
echo "Car ID";
echo "</td>";
echo "<td width='125'>";
echo "Car Name:";
echo "</td>";
echo "<td width='125'>";
echo "Car Details";
echo "</td>";
echo "<td width='125'>";
echo "Car Price";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width='125'>";
echo $cno;
echo "</td>";
echo "<td width='125'>";
echo $cname;
echo "</td>";
echo "<td width='125'>";
echo $cdetails;
echo "</td>";
echo "<td width='125'>";
echo $cprice;
echo "$";
echo "</td>";
echo "</tr>";
echo "</table>";
}
}
else
{
echo mysql_error();
}
?>
<a href="adminCars.php">back</a>