Angus Posted December 18, 2022 Share Posted December 18, 2022 I got my contact form to work but I cannot for the life of me figure out why my $message is working and not my $name or $email. Here is my code: My HTML My PHP: My details and message sent on my website: My message received in my email: Quote Link to comment https://forums.phpfreaks.com/topic/315660-help-only-receiving-message-in-contact-page/ Share on other sites More sharing options...
Barand Posted December 18, 2022 Share Posted December 18, 2022 After a brief scan, the only error I can see is that your second $headers value overwrites the first. For future reference, pictures of your code are as useful as a chocolate teapot. Quote Link to comment https://forums.phpfreaks.com/topic/315660-help-only-receiving-message-in-contact-page/#findComment-1603691 Share on other sites More sharing options...
Angus Posted December 18, 2022 Author Share Posted December 18, 2022 Barand, Thankyou for your response, I'm new to learning PHP. I have tried this solution and unfortunetly not much has changed. Is there anything I can do to make this easier for you to identify the problem. Thanks Angus Quote Link to comment https://forums.phpfreaks.com/topic/315660-help-only-receiving-message-in-contact-page/#findComment-1603692 Share on other sites More sharing options...
kicken Posted December 18, 2022 Share Posted December 18, 2022 The code you've posted here does not contain any error that would cause your described problem. However, I took a guess at your website URL and looked at the actual page and can say that the code you posted here is not the same as what is on the actual page. There is a difference in your <input> tags. If you look at them and identify what's missing you'll solve your issue. If you're still having trouble, make sure you post the actual code you are running on the site next time, and as text using a code block (the <> icon here) rather than as screenshots. 1 Quote Link to comment https://forums.phpfreaks.com/topic/315660-help-only-receiving-message-in-contact-page/#findComment-1603694 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.