All pastes #707870 Raw Edit

Miscellany

public php v1 · immutable
#707870 ·published 2007-09-23 11:21 UTC
rendered paste body
            <?php            if(isset($_GET['produsent'])) {        	            $_GET['produsent'] = $produsent;            $res = mysql_query("SELECT * FROM products WHERE producer='" . $produsent . "' ORDER BY date DESC");            while($row = mysql_fetch_array($res)) { ?>				<div class="item">                <img width="50" src="uploaded_imgs/<?=$row["img_url"];?>" alt="bilde" />                <h5><?=$row["name"];?></h5>                <p><?=$row["comment"];?></p>                <div class="store_btn"><form method="post" action="takecart.php"><input type="hidden" name="prod_nr" value="<?=$row["id"];?>" /><input class="read_more" type="submit" value="Les mer" name="view" /><input type="submit" value="Bestill" name="order" /></form></div>                </div>		            <? } } else {            	            $res = mysql_query("SELECT * FROM products ORDER BY date DESC");			while($row = mysql_fetch_array($res)) { ?>				<div class="item">                <img width="50" src="uploaded_imgs/<?=$row["img_url"];?>" alt="bilde" />                <h5><?=$row["name"];?></h5>                <p><?=$row["comment"];?></p>                <div class="store_btn"><form method="post" action="takecart.php"><input type="hidden" name="prod_nr" value="<?=$row["id"];?>" /><input class="read_more" type="submit" value="Les mer" name="view" /><input type="submit" value="Bestill" name="order" /></form></div>                </div>						<?php            }            }			?>