Initial commit
This commit is contained in:
19
fetch_data.php
Normal file
19
fetch_data.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if(isset($_POST['get_option']))
|
||||
{
|
||||
require("config/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
$kid = $_POST['get_option'];
|
||||
$ukid = $_COOKIE["ck_ukid"];
|
||||
|
||||
$db = dbconnect();
|
||||
$query = "SELECT ukid, bezeichnung FROM unterkategorie WHERE kid='$kid' ORDER BY bezeichnung ASC";
|
||||
$result = $db->query( $query);
|
||||
|
||||
while ($row = $result->fetch_array()){
|
||||
|
||||
echo "<option value='$row[ukid]'"; if($row['ukid'] == $ukid){ echo " selected ";} echo">".$row['bezeichnung']."</option>";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user