title: Form Select List to show Product Names from Mysql Database
body: <p>I dont get what im doing wrong here.. 
  i have about 125 product in the table but i get only the last product from the table so it shows only one item...  this is a simple calculator to provide the sales person and the customer how much box they would need and how much it would cost a quick estimate.
  Thank you for the help in advance..</p>
  
  <pre><code>&lt;?php
  
  include('admincik/config.php');
  include ('birlikte/ac.thumbs.php'); 
  
  //Retrieves data from MySQL 
  
   $data = mysql_query("SELECT * FROM Calculator ORDER BY isim") or die(mysql_error()); 
   //Puts it into an array 
   while($info = mysql_fetch_array( $data )) 
   { 
  $resim = $info['resim'];
  $isim = $info[isim];
  $boyut = $info[boyut];
  $pcs = $info[adet];
  $sqft = $info[sqft];
  $price = $info[price];
  }
  /////////Formdan gelen yada Giden//////////////
  $length =htmlspecialchars(stripslashes($_POST['Length'])); 
  $width =htmlspecialchars(stripslashes($_POST['Width'])); 
  $TileNameList = "&lt;option value=\"$sqft\"&gt;$isim $boyut&lt;/option&gt;";
  
  /////Matematiksel islemler/////////
  
  $equals = $length * $width;
  $box = round($equals / $sqft);
  $sqftbox = $box * $sqft;
  $TotalPrice = $sqftbox * $price
  
  ?&gt;
  &lt;div class="ana"&gt;
    &lt;table width="900" height="199" border="1"&gt;
      &lt;tr&gt;
        &lt;td width="150"&gt;Name&lt;/td&gt;
        &lt;td width="150"&gt;Length&lt;/td&gt;
        &lt;td width="150"&gt;Width&lt;/td&gt;
        &lt;td width="150"&gt;Total Sqft Area&lt;/td&gt;
        &lt;td width="200"&gt;Box Needed /Total Sqft&lt;/td&gt;
        &lt;td width="100"&gt;Price&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;form id="form5" name="form5" method="post" action=""&gt;
          &lt;select name="TileName" id="TileName"&gt;
  &lt;?php echo ($TileNameList); ?&gt;
          &lt;/select&gt;
        &lt;/td&gt;
        &lt;td&gt;&lt;input name="Length" type="text" id="Length"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="Width" id="Width"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="Sqft" id="Sqft" value="&lt;?php echo ($equals); ?&gt;"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo "You will need &lt;span style=\"color:red\"&gt;$box&lt;/span&gt; Boxes&lt;br&gt; Which is &lt;span style=\"color:red\"&gt;$sqftbox&lt;/span&gt; "; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo "$$TotalPrice"; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr &gt;
        &lt;td colspan="6" align="center"&gt;
          &lt;input type="submit" name="Submit" id="Submit" value="Submit" /&gt;
        &lt;/form&gt;&lt;/td&gt;
  
      &lt;/tr&gt;
    &lt;/table&gt;
  
  &lt;/div&gt;
  </code></pre>