Hey people, im trying to select multiple names from a form list but when i echo $email i get this : "resource id #3"
Here is my HTML form...
<form action="email.php" method="post">
<table width="90%" border="0">
<tr>
<td width="30%"><p></p><select name="person" size="20" multiple>
<?
mysql_connect("****", "****", "*****")
or die("Could not connect:" . mysql_error());
mysql_select_db("****") or die("connection failed");
$nameSelect = "SELECT fname,lname FROM aps_contacts";
$result = mysql_query($nameSelect);
while ( $row = @mysql_fetch_array($result) )
{
echo "<option value=\"$row[email]\" </option>";
print $row[fname];
print " ";
print $row[lname];
}
mysql_close();
?>
</select>
And here is where i try and print the variable...
<?
mysql_connect("****", "****", "****")
or die("Could not connect:" . mysql_error());
mysql_select_db("****") or die("connection failed");
if($_POST['Submit'] == 'Email')
{
$email = $_POST['person'];
echo($email);
$query = "SELECT email FROM aps_contacts WHERE email = '$email' ";
$do_query = mysql_query($query);
echo("$do_query");
}
mysql_close();
?>
Any suggestions why it is printing this resource id # 3 when i echo $email