<html>
<head></head>
<body>
<?php
$hostname="localhost";
$username="jesus_jesus";
$password="jesus";
$dbid="jesus_jesus";
$link=mysql_connect($hostname,$username,$password);
mysql_select_db($dbid) or die("unable to connect");
$result=mysql_query("select jid,industrytype from career");
if($result)
{ 
echo '<select>'; 
while($myrow = mysql_fetch_array($result))
{
echo '<option value="',$myrow['$industrytype'],'"></option>';  
}  
echo "</select>";
}
?>
</body>
</html>

in this code i'm getting only the listbox.not to able to retrive the data from the database..


i'm having two column jobid and industrytype in the table career.i want to display the industry type in listbox.

Problem:
in this code i'm getting only the listbox.not to able to retrive the data from the database..

You are getting the listbox and the values but you can see it, because you don't have the value between <option></option>.
Ie.,

echo '<option value='.$myrow['$industrytype'].'>'.$myrow['$industrytype'].'</option>';

Hey guys , thanks for the help on that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.