0
<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..

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by cVz
0

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>';
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.