I got this php email problem.
I need to Select an email from a database and send a mail to them.
Like this:
$email = $_POST['email'];
$to_email = mysql_query("SELECT email FROM emails WHERE email = '$email'");
$email = mysql_fetch_array($to_email, MYSQL_BOTH);
$to = ;
$subject = 'mail example';
$message = 'example from example with example..';
$headers = 'From: example@example.com
mail($to, $subject, $message, $headers);
but here comes the problem.
How do i get the email out of the database so i can use it in $to variable.
i need it as the email, as a string, so i will send it correctly.
Thanks !! from flezria


Sign In
Create Account


Back to top









