Can anyone please help me this code? I am a "real" newbie.
I want to email the data from the "appointment table" to a member in the "member table". for example, the first record from the appointment table to the first member in the member table and etc.
After each member has received an email I need to start the cycle all over again.
<?
$dbh=mysql_connect ("localhost","username","password") or die ("Unable to connect!");
mysql_select_db(database);
$today_date = date("m.d.y");
$the_time = date("H:i:s");
$result = mysql_query ("INSERT INTO appointment(dist_fname,dist_lname,prospect_name,email,time_zone,time,day,month,phone_number,prospect_email,today_date,the_time) VALUES ('$name1','$name2','$name','$email','$time_zone','$time','$day','$month','$phone_number','$prospect_email','$today_date','$the_time')
");
?>
members table
id id_number first_name last_name email
1 176031 Joe Brown 123@123.com
2 177031 Bob Brown 345@123.com
3 178671 Mary Brown 675@123.com
4 987123 Jim Brown 435@123.com
5 234786 Bill Brown 475@123.com