Location: PHPKode > scripts > wwdbank > wwdbank/accounts/messagesend1.php
<?php
Include_once('includes/session_config.php');
echo"<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">";
$from_user=($_POST['user_name']);
echo "<tr><td>User name $from_user</td></tr>";
//select users to send message to
$query1 = "SELECT * FROM user";
 $result1 = mysql_query($query1) or die();
 $number1=mysql_num_rows($result1);
$query2 = "SELECT * FROM parent";
 $result2 = mysql_query($query2) or die();
 $number2=mysql_num_rows($result2);

echo"<form action=\"$PHP_SELF?\" method=\"post\"><tr><td height=\"40\"><b>Select who you want to send a message to:</b></td></tr>";
echo"<tr><td colspan=\"4\" height=\"40\">";
echo '<select name="set_users">';
while ($row1 = mysql_fetch_array($result1))
	{
	$selected1 = $row1['user_name']==$_GET['user_name'] ? ' selected="yes"' : '';
	echo '<option value="'.$row1['user_name'].'"'.$selected1.'">'.$row1['user_name'].'</option>';
	}
while ($row2 = mysql_fetch_array($result2))
	{
	$selected2 = $row2['user_name']==$_GET['user_name'] ? ' selected="yes"' : '';
	echo '<option value="'.$row2['user_name'].'"'.$selected2.'">'.$row2['user_name'].'</option>';
	}	
echo '</select>';
echo"<tr><td width=\"150\" height=\"50\"></td><td height=\"50\" valign=\"bottom\">
  	<input type= \"hidden\" name= \"messagesend1\" value= \"messagesend1\" >
  	<input type= \"hidden\" name= \"messaging\" value= \"messaging\" >
	<input type=\"hidden\" name=\"from_user\" value=\"$from_user\">
	<input type= \"hidden\" name= \"user_name\" value= \"{$_SESSION['user_name']}\" >
	<input type=\"hidden\" name=\"pass\" value=\"{$_SESSION['pass']}\">
 
 	</td></tr>";
echo"<tr><td><input name=\"submit\" type=\"submit\" value=\"Submit\"></td></tr></form>";
echo"</table>";
?>

Return current item: wwdbank