Ik heb een shop script en nu maak ik dat je artikelen kan zetten maar nu wil ik de categorieeen van de shop in een select weergeven map dan staat er niks in
Code:

Code:
}
}
elseif($_GET[act] == aadd)
{
if($_SERVER[REQUEST_METHOD] == POST)
{
if(empty($_POST[naam]) || empty($_POST[beschrijving]))
{
$fouten .= Je hebt niet alles ingevuld!;
}
else
{
$cat = mysql_query("SELECT 1 FROM shop_artikelen WHERE naam = " .
mysql_real_escape_string($_POST[naam]) . "") or trigger_error(mysql_error());
if(mysql_num_rows($cat))
{
$fouten .= Deze artikel bestaat al;
}
if($fouten == ) {
mysql_query("INSERT INTO shop_artikelen (categorie, naam, beschrijving,
plaatje, prijs, maximaal_tekoop)
VALUES (" . mysql_real_escape_string($_POST[naam]) . ", "
.mysql_real_escape_string($_POST[beschrijving]) . ", "
.mysql_real_escape_string($_POST[plaatje]) . ")") or trigger_error(mysql_error());
$cat_id = mysql_result(mysql_query("SELECT id FROM shop_categorie WHERE
naam = " . mysql_real_escape_string($_POST[naam]) . " AND beschrijving = " .
mysql_real_escape_string($_POST[beschrijving]) . " AND plaatje = " .
mysql_real_escape_string($_POST[plaatje]) . ""));
echo <div class="greenerror">Artikel is aangemaakt. U wordt binnen enkele
seconden doorgestuurd of klik <a href="index">hier</a> als u niet wilt wachten</div><meta
http-equiv="refresh" content="3; URL=index">;
}
}
if(isset($fouten)) {
echo $fouten;
}
}
$query = mysql_query("SELECT * FROM shop_categorie") or die(mysql_error());
if(mysql_num_rows($query) == 1)
{
$fetchs = mysql_fetch_assoc($query);
}
?>
<div class="top">Artikel aanmaken</div><div class="mid">
<form action="#" method="post">
<table>
<tr>
<td>
<strong>Naam</strong>
</td>
<td>
<input type="text" name="naam">
</td>
</tr>
<tr>
<td>
<strong>Beschrijving</strong>
</td>
<td>
<input type="text" name="beschrijving">
</td>
</tr>
<tr>
<td>
<strong>Plaatje</strong>
</td>
<td>
<input type="text" name="plaatje">
</td>
</tr>
<tr>
<td>
<strong>Maximaal te koop</strong>
</td>
<td>
<input type="text" name="maximaal_tekoop">
</td>
</tr>
<tr>
<td>
<strong>Categorie</strong>
</td>
<td>
<select name="categorie">
<option value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$fetchs[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR] ?>">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL]
[COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$fetchs[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR] ?></option>
</select><br /><br />
</td>
</tr>
<tr>
<td>
<input type="submit" naam="submit" value="Aanmaken">
</td>
<td>
</td>
</tr>
</tr>
</table>
</form></div> 