<?php
include("conn.php");
$sql="select email from chat_guest where address like '%".$_GET['address']."%'";
mysql_query("set names 'utf8'",$dbconn);
$result=mysql_query($sql,$dbconn);
$rows=mysql_num_rows($result);
if($rows>0)
{
 ?>
<select name="etwchatemail" id="etwchatemail" onchange="checkmymailstate()">
<option value="">Select your E-mail address,please!!!</option>
<?php
for($i=0;$i<$rows;$i++)
{
 ?>
<option value="<?php echo mysql_result($result,$i,'email'); ?>"><?php echo mysql_result($result,$i,'email'); ?></option>
<?php
}
mysql_close($dbconn);
mysql_free_result($result);
 ?>
<option value="no email">Can't find my E-mail address</option>
</select>
<?php
}
else
{
 ?>
<input type="text"  id="etwchatemail" value="Enter Your E-mail Address" onClick="noinfo(this)" onChange="checkemail()" />
<?php
}
 ?>