airforcefc
02-16-2008, 11:40 PM
Hello,
I have the following, I basically want the Member to select all other members within the database but at the same time not displaying his own member name within the select menu, stopping him from sending a message to himself.
<?php
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name ORDER BY TippingName ASC";
$result=mysql_query($sql);
?>
<select name="to_member">
<option value="" selected> - - Select - - </option>
<?php
while($rows=mysql_fetch_array($result)){
?>
<option value="<? echo $rows['TippingName']; ?>"><? echo $rows['TippingName']; ?></option>
<?php
}
?>
</select>
<?php
mysql_close();
?>
I have the following, I basically want the Member to select all other members within the database but at the same time not displaying his own member name within the select menu, stopping him from sending a message to himself.
<?php
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name ORDER BY TippingName ASC";
$result=mysql_query($sql);
?>
<select name="to_member">
<option value="" selected> - - Select - - </option>
<?php
while($rows=mysql_fetch_array($result)){
?>
<option value="<? echo $rows['TippingName']; ?>"><? echo $rows['TippingName']; ?></option>
<?php
}
?>
</select>
<?php
mysql_close();
?>