PDA

View Full Version : php contact form how to use a recordset for $emailadd


nanny
08-23-2006, 02:12 AM
Hi I am wanting to use a contact form for my free directory. What I am wanting is instead of the email form sent to me it is sent to the listing email. So the recordset would be $row['email'] say, just needing it to be there and sent to that address instead of say info@mailhouse.com

I have tried placing it in the form header using the bindings and other various ways, has anyone a suggestion?
Thanks
Nanny

davidj
08-24-2006, 08:45 AM
ok

you need to wrap this email array in a DO loop in order to pull out all the email addresses

do { // << begin looping

$email = $row['email']; // << set email to var

//******************
//Add your email script here and replace your hardcoded email address..
//with $email above.
//******************

} while ($row_Query = mysql_fetch_assoc($Query)); // << perform while condition