Skip to content
Advertisement

How to set PHP variables in email TO header?

I’m trying to send an email using PHP mail(). I created a form that allows the user to input their information and press a submit button to send the email.

What I’m trying to do is to grab $email and set it to the $to header to send to the receiver. Everything else works perfectly, $name and $contact outputs just missing $email.

JavaScript

?>

Any tips would be appreciated

Advertisement

Answer

Solution:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement