Display Mysql table field values in Select box

前端 未结 6 1290
失恋的感觉
失恋的感觉 2021-02-06 06:16

I want to display the Mysql table Filed values in selectbox. I tried the following code to display. But it normally display the specified field values in echo function and not i

6条回答
  •  春和景丽
    2021-02-06 07:07

    You have to use while loop to display option in select box. try this ...

     $con = mysql_connect("localhost","root","root");
     $db = mysql_select_db("Time_sheet",$con);
     $get=mysql_query("SELECT Emp_id FROM Employee order by Emp_id");
    
     
     
      

提交回复
热议问题