1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?PHP
function dbconnect(){
mysql_pconnect("localhost", "admin", "mscmks71s11f132n") or die("Unable to connect to SQL server"); mysql_select_db("niki_dev") or die("Unable to select database");
echo "Hello "; $headers .="MIME-Version: 1.0 \n"; $headers .="From: admin.gridtip@gridtip.net \n"; $headers .="X-Mailer: WebMailer \n"; $headers .="X-Priority:3 \n"; $headers .="Content-Type: text/html; charset=iso-8859-1 \n";
dbconnect();
$gp=mysql_query("SELECT u_name, u_email FROM users);
if ($erg_users=mysql_fetch_array($users)) { echo "erg_users"; $user_name=$erg_users['u_name']; $user_emails=$erg_users['u_email'];
while ($erg_users=mysql_fetch_array($users)) { echo "erg_users"; $message=" <html><head><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head> <body> <p><font face='Verdana, Arial, Helvetica, sans-serif' size='2'>Hello GRID TIP Admin,<BR><BR> here is the list of GRID TIP users incl. email addresses: <BR><BR> <b>".$user_name."</b> ".$user_email."<BR><BR> <BR><BR> Cheers,<BR><BR> Your <b>GRID TIP</b> Admin<BR><BR>
$status= mail("mam@heimam.at","GRID TIP - Users List",$message,$headers); echo "status:".$status; } } ?>
|