Location: PHPKode > projects > Einkaufszettelgenerator > EZettel0.1/prod_del.php
<?
session_start();
$us= $HTTP_SESSION_VARS['uid'];
//echo "user=$us<br>"; 
?>
<HTML>

<LINK REL="stylesheet" TYPE="text/css" HREF="menu.css">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Product - to db</title>

</head>
<body class="body1">
<?
include("menu.ini");


//echo "prod=$_GET[prod_id] <br>";



 $strsql = "delete from product where prod_id='$_GET[prod_id]';";

 $result = mysql_query($strsql);  


echo "<TABLE border=1 align=center CELLSPACING=0 CELLPADDING=5i class=prod><TR class=table><TD>Название продукта</TD><TD>Тип</TD><TD>Цена</TD><TD>Магазин</TD><TD>Покупать всегда</TD><TR>";
   $strsql1 = "select p.prod_name,t.typ_name, p.prod_price,p.markt, p.const from product p, prod_type t where (t.typ_id=p.prod_type) and p.user_id='$us' and t.user_id='$us' ORDER BY p.prod_type;"; 
   $result1 = mysql_query($strsql1, $connection);
   $i=0;
    while ( $row = mysql_fetch_row($result1) )
       {
        $i+=1;

echo "<TR><TD>$row[0]</TD><TD>$row[1]</TD><TD>$row[2]</TD>";

$strsql_mn = "select markt_name from markt where (markt_id='$row[3]');";
$result_mn = mysql_query($strsql_mn, $connection);
   $n=0;
    while ( $row_mn = mysql_fetch_row($result_mn) )
       {
        $n+=1;
       $row[3]=$row_mn[0]; 

        }


echo "<TD>$row[3]</TD><TD>&nbsp;$row[4]</TD><TR>";
       }

?> 
</TABLE>    
<center><A HREF=input.php>Ввести новый продукт</a>&nbsp;&nbsp;<A HREF=start.php>На первую страницу</A>&nbsp;&nbsp;<A HREF=edit.php>Редактировать список продуктов</A></center> 
Return current item: Einkaufszettelgenerator