...

View Full Version : PHP Email : Send to Email in Recordset



mrjasonsweet
11-15-2007, 12:12 AM
My script sends email fine when I have a hard-coded email address but when I try to dynamically change the email recipient based on the results of a recordset, the email script fails.

Clearly, I have the wrong syntax. The code below is incomplete and shows just the relevant part of the script:


<?php
$to = $row_rs_password['email_address'];
$subject = 'Rycote.com - Password Request';
$from = 'root@crozius.com';
$message ='';

My problem, it seems, has to do with : $row_rs_password['email_address'].

What is the proper syntax?

Thanks very much for any feedback!

Inigoesdr
11-15-2007, 02:20 AM
You're going to have to show more code... specifically the recordset.

mrjasonsweet
11-15-2007, 05:08 PM
Thanks for the reply! Turns out my recordset and syntax are fine. There was a problem with the mail server and I didn't receive the email until some hours later.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum