-
Notifications
You must be signed in to change notification settings - Fork 0
/
Items.php
31 lines (27 loc) · 1.16 KB
/
Items.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
<?php
header("Content-Type: text/html; charset=utf-8");
$conn = mysqli_connect('localhost', 'root','') or die("Hibás csatlakozás!");
if ( mysqli_select_db($conn, 'adbktporog_szlxagt.sze') ) { // ha sikeres az adatbázis kiválasztása
$sql = "SELECT * FROM item ORDER BY Neve ASC;";
try{
$res = mysqli_query($conn, $sql) or die ('Hibas utasitas!' . mysqli_error($conn));
}catch(Exception $e){
print $e;
}
while (($row = mysqli_fetch_assoc($res))!= null) {
echo " Szint: ".$row['Szint']. "Név: ".$row['Neve'].
"ItemID: ".$row['ItemID']." Erteke ".$row['Erteke'].
"Eletero: ".$row['Eletero']." Pancel ".$row['Pancel'].
" Erő: ".$row['Ero']." ügyesség: "
.$row['Ugyesseg']." Alkat: ".$row['Alkat'].
" Karizma: ".$row['Karizma'].
" Inteligencia: ".$row['Inteligencia'];
echo "<br>";
}
mysqli_free_result($res);
} else { // nem sikerült csatlakozni az adatbázishoz
die('Nem sikerült csatlakozni az adatbázishoz.');
}
mysqli_close($conn);
?>
<a href="index.php"> Vissza </a>