-
Notifications
You must be signed in to change notification settings - Fork 0
/
poneys.php
56 lines (42 loc) · 1.46 KB
/
poneys.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
<?php
include "config/config.php";
include "functions/database.fn.php";
$link = database_connect($db);
$sql = 'SELECT * FROM poney WHERE id='.$_GET['id'];
$result = mysql_query($sql);
if(!$result){
die('erreur dans la requete : ' . mysql_error());
}
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
include "templates/html-opening.php";
$rate = $row["rate"];
echo '<img src="images/'.$row["image"].'" alt="poney" class="imgprofile" /><br />';
if($rate == 1){
echo '<img src="images/1star.gif" alt="stars" class="starsprofile" />';
}
elseif($rate == 2) {
echo '<img src="images/2stars.gif" alt="stars" class="starsprofile" />';
}
elseif($rate == 3) {
echo '<img src="images/3stars.gif" alt="stars" class="starsprofile" />';
}
elseif($rate == 4) {
echo '<img src="images/4stars.gif" alt="stars" class="starsprofile" />';
}
elseif($rate == 5) {
echo '<img src="images/5stars.gif" alt="stars" class="starsprofile" />';
}
echo '<div id="details">';
echo '<h3>'.$row["nom"].'</h3>';
echo '<ul>';
echo '<li>Age: '.$row["age"].'</li>';
echo '<li>Sex: '.$row["sex"].'</li>';
echo '<li>Color: '.$row["color"].'</li>';
echo '<li>Height: '.$row["height"].'</li>';
echo '<li>Robe: '.$row["robe"].'</li>';
echo '<li>Type: '.$row["type"].'</li>';
echo '</ul>';
}
?>
</div> <!-- closing details -->
<?php include "templates/html-closing.php"; ?>