<? include_once "system/connect.php"; $title= "Магазин"; include_once "system/title.php"; include_once "system/head.php"; $user = auth(); if(!$user){ header("Location:/"); exit; } $shop = mysql_query('SELECT * FROM `shop`'); while($shop1 = mysql_fetch_assoc($shop)){ ?> <?=$shop1['name']?> | <a href='?buy=<?=$shop1['id']?>'>Купить</a> <? } if($_GET['buy']){ mysql_query('UPDATE `inv` SET `w1` = '1' WHERE `id_us` = '". $user['id']."'); } include_once "system/foot.php";
mysql_query("UPDATE `inv` SET `w1`=1 WHERE `id_us`=".$user['id']."");