php - Mailing code giving an error -


this question has answer here:

i new php & have tried out code in php sending mail user simple means, facing issues code giving error..!! please me.

php

$to      =  ' '". $_session['email'] ."' ';         $subject = 'your vault number';         $message = 'your vault number '". $_session['vault_no'] ."' ';         $headers = 'from: innovation@miisky.com' . "\r\n" .             'reply-to: innovation@miisky.com' . "\r\n" .             'x-mailer: php/' . phpversion();  mail($to, $subject, $message, $headers); 

you have syntax error in string assignment:

$to      =  ' '". $_session['email'] ."' ';               ^ here                   ^ , here 

you don't need delimiters part of final string,

$to      =  $_session['email']; 

is enough, $_session['email'] string.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -