jeliot Posted April 5, 2006 Share Posted April 5, 2006 I've been all over the Manual and was able to get bits and pieces of what I need to collect just the email field from my db and send email but its just not FLYIN...............Here's what i've got<? $link = mysql_connect("host", "user", "password"); mysql_select_db("test"); $query = "SELECT * FROM test_list"; $result = mysql_query($query); $num=mysql_numrows($result); mysql_close($link); $i=0; while ($i < $num) { $email=mysql_result($result,$i,"email") $subject = "Ggap Show Reminder"; $body = "This is a test email for Ggap New Show Reminders"; $headers = "From: user@mydomain.com"; mail($email,$subject,$body,$headers); $i++; }?>Please Help.......I'M CROSSED EYED...........=) Quote Link to comment https://forums.phpfreaks.com/topic/6621-phpmysql-mail/ Share on other sites More sharing options...
earl_dc10 Posted April 5, 2006 Share Posted April 5, 2006 I believe you want to change[code] $num=mysql_numrows($result);[/code]to[code] $num=mysql_num_rows($result);[/code] Quote Link to comment https://forums.phpfreaks.com/topic/6621-phpmysql-mail/#findComment-24051 Share on other sites More sharing options...
jeliot Posted April 5, 2006 Author Share Posted April 5, 2006 [!--quoteo(post=361807:date=Apr 4 2006, 10:28 PM:name=earl_dc10)--][div class=\'quotetop\']QUOTE(earl_dc10 @ Apr 4 2006, 10:28 PM) [snapback]361807[/snapback][/div][div class=\'quotemain\'][!--quotec--]I believe you want to change[code] $num=mysql_numrows($result);[/code]to[code] $num=mysql_num_rows($result);[/code][/quote]Thanks but still a no go........I'm a little confused on where I'm actually getting just my email....field/Colum Quote Link to comment https://forums.phpfreaks.com/topic/6621-phpmysql-mail/#findComment-24059 Share on other sites More sharing options...
earl_dc10 Posted April 5, 2006 Share Posted April 5, 2006 sorry, I forgot that mysql_numrows is just an earlier version, but probly a good idea to change it anyway. do you receive any errors or does it just not run. oh, maybe a ";" after defining $email will do it Quote Link to comment https://forums.phpfreaks.com/topic/6621-phpmysql-mail/#findComment-24062 Share on other sites More sharing options...
jeliot Posted April 5, 2006 Author Share Posted April 5, 2006 [!--quoteo(post=361818:date=Apr 4 2006, 11:17 PM:name=earl_dc10)--][div class=\'quotetop\']QUOTE(earl_dc10 @ Apr 4 2006, 11:17 PM) [snapback]361818[/snapback][/div][div class=\'quotemain\'][!--quotec--]sorry, I forgot that mysql_numrows is just an earlier version, but probly a good idea to change it anyway. do you receive any errors or does it just not run. oh, maybe a ";" after defining $email will do it[/quote]Yah the ; was a typo from my last edit.........still nothing......id did have the script running but it was using every field and data in each field as a email address so i think my only poblem is getting to just pull the email fieldand no i'm not getting any errors i'm still chuggin........... Quote Link to comment https://forums.phpfreaks.com/topic/6621-phpmysql-mail/#findComment-24085 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.