You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
3 years ago | |
|---|---|---|
| .vscode | 3 years ago | |
| bootstrap_php | 3 years ago | |
| formulare | 3 years ago | |
| formulare_v2 | 3 years ago | |
| get_isset_header | 3 years ago | |
| include | 3 years ago | |
| mysql-join | 3 years ago | |
| mysql-up-del | 3 years ago | |
| php-insert | 3 years ago | |
| php-insert-part2 | 3 years ago | |
| prcoviceni | 3 years ago | |
| znamka_hodnoceni_webu | 3 years ago | |
| .gitignore | 3 years ago | |
| 01.php | 3 years ago | |
| 02.php | 3 years ago | |
| 03.php | 3 years ago | |
| README.md | 3 years ago | |
| get.php | 3 years ago | |
| index.php | 3 years ago | |
| zpusob_prace_php.md | 3 years ago | |
README.md
3im-wtl-php
php repozitar
<?php
//napojení na DB
$servername = "studenti.odbornaskola.cz";
$user = "USERNAME";
$pw = "PASSWORD";
$dbname = "DBNAME";
$conn = mysqli_connect($servername, $user, $pw, $dbname);
?>
příprava dat
//příprava k zobrazení dat
$sql = "SELECT * FROM intro ORDER BY id DESC";
$result = mysqli_query($conn,$sql);
zobrazení dat
<?php
//vypsat data
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)){
echo $row["id"];
}
}
?>