Hey all, I got the script working that I was having problems with (see http://sitepointforums.com/showthrea...readid=10657).

The script grabs the user list from my database and prints out name and email in a series of mailto: links. Now I want to be able to add one big long mailto: with all of the users emails like this:

<a onmouseover="showStatus('email everyone'); return true;" href="mailto:emails go here">email everyone</a>

My questions are:
1) After the PHP script parses the $result variable in the last while loop, does $result still contain data?

2) If it does not, then would I have to run another query?

3) or is there a better way of doing that?

//start editing here
$dbhost = "localhost"; //db host name
$dbuser = "user"; //db username
$dbpass = "pass"; //db password
$dbname = "dreaming_smallgroup"; //db name
$dbtable_users = "osg_user"; //table on dbname with data in it
$dbtable_email = "osg_email"; //table on dbname with data in it
//stop editing here

$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$conn) {
echo "<P>Unable to connect to the database server at this time.</P>";
if (! @mysql_select_db($dbname) ) {
echo( "<P>Unable to locate the database at this time.</P>" );

$result = mysql_query("SELECT CONCAT(first_name,' ',last_name) AS name,email FROM osg_user, osg_email WHERE id=osg_user.uid");
if (!$result) {
echo "<P>Error performing query on database";

while ($row = mysql_fetch_array($result)){
echo "<a href=mailto:".$row["email"].">".$row["name"]."</a><br>";