Well i am not sure what exactly are you talking about. Although i appreciate your response. as far as i understand there is nothing wrong with the HTML code because my web page is working pretty smooth and it is also communicating with the PHP file tht is linked to my form but the PHP file is sending an email which is blank. So i think there is something wrong with the PHP coding itself http://www.luckywheelscarrental.com/contact-us.html check it out. Thank you
I think your problem is that you haven’t named your input fields. PHP has no idea where to get the name, email, subject and message from to add to your email. So what you need to do is like this:
<input type="text" class="form-control" required="required" placeholder="First Name" name="name">
and <input type="text" class="form-control" required="required" placeholder="Email address" name="email">
Try replacing those two and lmk if it sends anything.
Thank you. But i already been on both of those links tried them and tested not working for me. But hey i came across another forum where someone has an issue similar to mine and some expert recommended him this answer. which worked for him.
your code isn’t supplying any data in the .post() method. you need to add $(this).serialize() to get all the form fields/values.
untested but should work - $.post($(this).attr('action'),$(this).serialize(), function(data) {
But now i am confused where to place this line in my code. Sorry i am very new to php
Did you understand that form fields need a name attribute as CalvT pointed out?
Your processing code is looking for these $_POST['Names'], i.e. name, email, subject and message and none are being found because the name attribute is missing. So note, the processing is looking for example $_POST['name'] yet your form doesn’t have an input with name=“name”. You have first name and last name inputs but nether have a name attribute, e.g. name=“FirstName”, name=“LastName” etc. POST subject is nowhere to be found as well so you need to check that both the form and processing code match $_POST['KEY] to attribute name=“KEY”.
Also note that you should not be sending email from a POST email address. Emails should be sent from an email address setup for your domain like info@mydomain.com You can specify a reply to header for the posted email so that when you reply, you are addressing the email to the person requesting info.
@Drummin@jemz you both making sense to me to some extent but the thing is this is my first time with php coding i would appreciate if you can tell me which line of code i must delete or replace or modify and what should i type where in my sendemail.php thanks
Jemz the form is submitting and i am also receiving an email. But the email is blank it only shows:
Name:
Email:
Subject:
Message:
Thats it, it dont show any of the text fields even dont show the senders email address… and i tried your code it still dont work… thanks for your support