Notice: Undefined variable: message in /Users/kobigo/Sites/yedikitamuhendislik.com/sendEmail.php on line 61
Look at what appears to be line 61:
$message .= "Gönd.: " . $name . "<br />";
You’re trying to append to $message
, but you never defined it in the first place. You can append to it after it’s been defined, but on this first line you need to simply define it and assign to it:
$message = "Gönd.: " . $name . "<br />";
The remaining similar lines can append to it.
You’re also attaching to the wrong event in your JavaScript code:
$('#send_message').on('submit',function(e){
#send_message
is a button, not a form. It doesn’t have a submit
event. Attach to the form instead:
$('#contact_form').on('submit',function(e){
7
solved PHP contact form with Jquery validation not working