Det jeg gerne vil er at få denne kode:
//hent størrelser
$get_sizes = "select item_size from store_item_size
where item_id = $_GET[item_id] order by item_size";
$get_sizes_res = mysql_query($get_sizes)
or die(mysql_error());
if (mysql_num_rows($get_sizes_res) > 0) {
$display_block .= "<P><strong>Findes i størrelserne:
</strong><select name=\\"sel_item_size\\" onchange=\\"javascript:document.Size.submit();\\">";
while ($sizes = mysql_fetch_array($get_sizes_res)) {
$item_size = $sizes['item_size'];
$display_block .= "<option value=\\"
$item_size\\">$item_size</option>";
}
$display_block .= "</select>";
}
TIL AT OPDATERE DENNE KODE:
//hent antal
$get_qty = "select store_item_qty from store_item_size
where item_id = $_GET[item_id] order by store_item_qty";
$get_qty_res = mysql_query($get_qty)
or die(mysql_error());
if (mysql_num_rows($get_qty_res) > 0) {
$display_block .= "<P><strong>Antal:
</strong><select name=\\"sel_item_qty\\">";
while ($qty = mysql_fetch_array($get_qty_res)) {
$store_item_qty = $qty['store_item_qty'];
$display_block .= "<option value=\\"
$store_item_qty\\">$store_item_qty</option>";
for ($i=1; $i<$qty['store_item_qty']; $i++) {
$display_block .= "<option value=\\"$i\\">$i</option>";
}
}
se hvad jeg mener her:
http://www.xxxxx.dk/visvare.php?item_id=7 hvor størrelserne viser ALLE fra databasen....