Skip to content
Snippets Groups Projects
MenueAuswahl.php 714 B
Newer Older
Eric Laufer's avatar
Eric Laufer committed
<?php

require_once('../../lib/db_config.php');
require_once('../../lib/datenbank.inc.php');
require_once('../../lib/functions.lib.php');

$aus = '';
$datenbank = new DB;
$id = 0;
if(is_numeric($_POST['id'])){ $id = $_POST['id'];}

if($_POST['art'] == 'user'){ $art = M_US;}
if($_POST['art'] == 'admin'){ $art = M_AD;}

foreach($datenbank->get_results("SELECT name,id FROM ". PREFIX . $art ." WHERE box = '$id' ") AS $res){
	$aus .= '<option value="'. $res->id .'">'. $res->name.' </option>';
}

echo '
		<td>Men&uuml;punkt w&auml;hlen<br><i><small>optional</small></i></td>
		<td>
			<select name="uid" class="form-control">
				<option value="0">bitte w&auml;hlen</option>
				'. $aus .'
			</select>
		</td>
';