-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
50 lines (40 loc) · 1.29 KB
/
config.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
<?php
$dbHost = 'localhost';
$dbName = 'Project_Used_Cars';
$dbUsername = 'root';
$dbPassword = 123;
$dbconnect= mysqli_connect($dbHost, $dbUsername, $dbPassword, $dbName);
if (!$dbconnect) {
die("Connection Error".mysqli_connect_error());
}/*
function getall(){
$current_user=$_SESSION['uid'];
$sql="SELECT sellcar.car_id,sellcar.user_id,sellcar.City,YEAR(sellcar.Manu_year),sellcar.Model,sellcar.Price,Listing.Image FROM `sellcar` INNER JOIN Listing ON sellcar.car_id=Listing.car_id AND sellcar.user_id=Listing.user_id WHERE sellcar.user_id='$current_user' AND Listing.user_id='$current_user';";
$result=mysqli_query($dbconnect,$sql);
//$last_id=mysqli_insert_id($dbconnect);
if (mysqli_num_rows($result)>0) {
return $result;
}
}
//>__________________________________________
function showdata($img,$model,$city,$year,$price)
{
$element ="
<div class='col-lg-4'>
<div class='main'>
<div class='img_main'>
<img src='../Car_images/$img'>
<div class='text'>
<h3>Model : $model</h3>
<h3>City : $city</h3>
<h3>Year : $year</h3>
<h3>Price : $price</h3>
</div>
</div>
</div>
</div>
";
echo($element);
}
*/
?>