Location: PHPKode > projects > Einkaufszettelgenerator > EZettel0.1/input_menu.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>Menu - start</title>

</head>
<body class="body1">

<P><P>
<TABLE BORDER=1 align=center class="menu" cellspacing="3" cellpadding="2">
<form   Method=post action=menu_to_db.php> 
<TR><TD>Tag</TD><TD><SELECT name=tag class="field"><OPTION>Понедельник</OPTION><BR>
                                               <OPTION>Вторник</OPTION><BR>
                                               <OPTION>Среда</OPTION><BR> 
                                               <OPTION>Четверг</OPTION><BR> 
                                               <OPTION>Пятница</OPTION><BR> 
                                                <OPTION>Суббота</OPTION><BR> 
                                                 <OPTION>Воскресенье</OPTION><BR> 
                                     </SELECT></TD></TR>

<?

include("menu.ini");

 $strsql_1 = "select type_name from speise_type where user_id='$us';";
 $result_1 = mysql_query($strsql_1, $connection);
   $i=0;
    while ( $row_1 = mysql_fetch_row($result_1) )
       {
        $i+=1;                                                                

$strsql_t = "select type_id from speise_type where (type_name='$row_1[0]');";
 $result_t = mysql_query($strsql_t, $connection);
   $t=0;
    while ( $row_t = mysql_fetch_row($result_t) )
       {
        $type_id=$row_t[0];
        }                                                                              


echo "<TR><TD>$row_1[0]</TD><TD><SELECT MULTIPLE name=\"speise_name[]\" class=field>";


$strsql_2 = "select speise_name, speise_id from speise where speise_type='$type_id' and user_id='$us';";
echo "str=$strsql_2<br>";
 $result_2 = mysql_query($strsql_2, $connection);
   $n=0;
    while ( $row_2 = mysql_fetch_row($result_2) )
       {
        $n+=1;  
echo "<OPTION value=$row_2[1]>$row_2[0]</OPTION><BR>";   

     }
echo "</SELECT></TD></TR>";    

//echo "<TR><TD>Speise 2 type $row_1[0]</TD><TD><SELECT name=speise_name_$i_2>";   
//$strsql_2 = "select speise_name from speise where (speise_type='$type_id');";
// $result_2 = mysql_query($strsql_2, $connection);
//   $n=0;
  //  while ( $row_2 = mysql_fetch_row($result_2) )
    //   {
      //  $n+=1;
//echo "<OPTION>$row_2[0]</OPTION><BR>";
     
  //   }
//echo "</SELECT> 
//</TD></TR>";
echo "<TR><TD COLSPAN=2> </TD></TR>";       
  }
?>

<TR><TD COLSPAN=2><INPUT type=submit value=Next name=Submit></TD></TR></TABLE>
</FORM>                                                                               
Return current item: Einkaufszettelgenerator