Email Addresses

uid;

//get db connect info
$fp=fopen(“.dbdat”,”r”);
while ($ininfo = fscanf($fp,”%s\n”)){
list ($dbname) = $ininfo;
}
fclose($fp);
$fp=fopen(“.pwddat”,”r”);
while ($ininfo = fscanf($fp,”%s\n”)){
list ($pwd) = $ininfo;
}

fclose($fp);
$fp=fopen(“.usrdat”,”r”);
while ($ininfo = fscanf($fp,”%s\n”)){
list ($usr) = $ininfo;
}
fclose($fp);

/* connect to db */
$link=mysql_connect(“localhost”,$usr,$pwd) or die(“

The database is currently experiencing technical problems. Please try your request again later, or contact web@aicardisyndrome.org to report this problem. We appologize for the inconvenience!”);
mysql_select_db(“$dbname”) or die(“Could not use database”);

//$q=”select sid,uid from webform_submissions”;

$q=”select a.sid,a.uid from webform_submissions a,profile_values
b where b.uid=a.uid and fid=2 and nid=362 order by b.value”;

$r=mysql_query($q);

while ($row=mysql_fetch_array($r))
{
$sid=$row[“sid”];
$uid=$row[“uid”];
$q2=”select name,mail from users where uid=’$uid'”;
$r2=mysql_query($q2);
$row2=mysql_fetch_array($r2);

$q3=”select value from profile_values where uid=’$uid’ and fid=2″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$plast=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=1″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$pfirst=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=17″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$glast=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=10″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$gfirst=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=7″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$phone=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=15″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$altphone=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=11″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$addr=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=3″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$city=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=14″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$state=$row3[“value”];

$q3=”select value from profile_values where uid=’$uid’ and fid=12″;
$r3=mysql_query($q3);
$row3=mysql_fetch_array($r3);
$zip=$row3[“value”];

$q3=”select mail from users where uid=$uid”;
$r3=mysql_query($q3);
while ($row3=mysql_fetch_array($r3))
{
$email=$row3[“mail”];
}

print “$email ,
“;

}

?>

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top