Jump to content

ajsuk

Members
  • Posts

    4
  • Joined

  • Last visited

ajsuk's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Again another nooby question I'm sure but I'm stuck so shall have to ask... :)As the title says really, I'm looking to grab email addresses from a database to make up a recipients list for this email script... I've managed to come up with something which will do the job but running this 500 times over doesn't seem a great solution to me... :)Is there a way I can add collect all of the 'email' results, add seperating commas between them and mail to them? or an even better way of doing it?Anything suggestions at all would be great!Thanks,-Andy. <db connect code etc...>while($row = mysql_fetch_array($result)){$to = $row['email'];$subject = "Test Email";$message = "Test Email Message";$from = "someone@mydomain.com";$headers = "From: $from";mail($to,$subject,$message,$headers);}mysql_close($con);?>
  2. Taking some ideas from you code I got the result I wanted,Thanks much.
  3. Hey there, I'm quite new to PHP & MySQL so please be gentle hehe.I've been playing with reading and updating values in a test database and its all been pretty straight forward with simple textfields and such, echoing in data to the values etc.However, when it comes to drop-downs or checkboxes for instance I can't at all see how to check and set the option(s) with whats already in the DB and use that as the intially selected value etc...I'd like to have some kind of example code for you but I've really not got a clue about this one hehe.Anything you can give me would be great!Thanks alot in advance,Andy.
×
×
  • Create New...