如何显示我在选项值中选择的内容

Size: &nbsp; <select class="details_order1" name="size" >

                <?php
                while($data=mysql_fetch_assoc($select_size))
                { $prod_diay = $data['prod_id'];
                    $sze = $data['size_name'] ;
                ?>
                    <option value="<?php echo $prod_diay ?>"><?php echo $sze ?></option>

                <?php
                }

                ?>
            </select>

Functions.php

function get_size($pid) {
$result=mysql_query("select id from product_tbl where id='$pid' ") ;
$row=mysql_fetch_array($result);    
    $aydi = $row['id'];

$sel = mysql_query("SELECT size_name FROM size_tbl WHERE prod_id='$aydi' ");
$row2 = mysql_fetch_array($sel);            
return $row2['size_name'];

} And this is when i display from what i select in the select option but i only got the default or the first row from the database

    &nbsp; <?php echo $psize ?>
Wherever we want use php with html then use syntax like this.
   this is html with php code.
   <select>
   <option>Select any name</option>
   <?php
   $fetch_info=mysql_query("select `id`,`name` from user_details") or die(mysql_error());
   while($row=mysql_fetch_array($fetch_info)){
       echo '<option value='.$row['id'].'>'.$row['name'].'</option>';
   }
   ?>
   </select>

Thank you