<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="form1" name="form1" method="get">
<select name="select">
<option value="">--- Select ---</option>
<?php
$connection = mysql_connect("localhost", "root", "") or die("Cannot connect to MySQL server: " .
mysql_error());
$db_selected = mysql_select_db('tmetrix', $connection);
$query ="select CELLID from comments";
$result=mysql_query($query);
// start the select box
while($row=mysql_fetch_assoc($result)){
echo "<option value=\"$row[CELLID]\">$row[CELLID]</option>\n";
}
?>
</select>
<input type="hidden" name="submit" value="1">
<input type="submit" name="Submit" value="Select" />
</form>
<?
// If you have selected from list box.
if(isset($select)&&$select!=""){
// Get records from database (table "name_list").
$result=mysql_query("select problem from comments where id= '$_GET['select']' ");
$row=mysql_fetch_assoc($result);
?>
Information about <strong><? echo $row['Cellid']; ?></strong> company...</p>
echo "shruti";
<?
// End if statement.
}
// Close database connection.
mysql_close();
?>
</p>
</body>
</html>