Location: PHPKode > projects > Einkaufszettelgenerator > EZettel0.1/input_speise.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"> 

</head>
<body class="speise">
<P><P>
<TABLE BORDER=1 align=center class="table">
<form  name=prod_input Method=post action=speise_to_db.php> 
<TR><TD>Название</TD><TD><input type=text name=speise_name size=50 class="field"></TD></TR> 
<TR><TD>Вид</TD><TD> <SELECT name=speise_type >
<?
                                                                                       
include("menu.ini");

$strsql1 = "select type_name,type_id from speise_type where user_id='$us' ORDER BY type_id;";
$result1 = mysql_query($strsql1, $connection);
   $i=0;
	    while ( $row1 = mysql_fetch_row($result1) )
	       {
		$i+=1;                                                                
		echo "<OPTION class=field>$row1[0]</OPTION><BR>";
		}
	?>
	</SELECT>                                          
	</TD></TR>  
	<TR><TD>Рецепт</TD><TD><textarea name=speise_recept rows=6 cols=41 class="field">Рецепт</textarea></TD></TR>   

<? 
for ($k = 1; $k <= 10; $k++)
{
echo "<TR><TD>Продукты</TD><TD> <SELECT name=prod_id_$k class=field>";
echo "<OPTION> </OPTION><BR>";   
$strsql2 = "select prod_name,prod_id from product where user_id='$us' ORDER BY prod_type;";
$result2 = mysql_query($strsql2, $connection);
   $i=0;
            while ( $row2 = mysql_fetch_row($result2) )
               {
                $i+=1;
                echo "<OPTION class=field>$row2[0]</OPTION><BR>";
                }
       echo "</SELECT></TD></TR>";
    }
?>

<TR><TD COLSPAN=2><INPUT type=submit value="Input" name=Submit> <A HREF=start.php>На первую страницу</a></TD></TR></TABLE>
</FORM> 
</HTML>                                                                              
Return current item: Einkaufszettelgenerator