hmcdowell 0 Posted July 17, 2015 Report Share Posted July 17, 2015 I am having problems with a contact form. The form uses both HTML and PHP. The form itself, which is visible to the public, is in HTML, however it used PHP as part of the internal code. I have attached both the PHP and the HTML code in a txt document, now these are two different pages. I hope someone can help. Contact Form coding.txt Quote Link to post Share on other sites
Ingolme 1,020 Posted July 17, 2015 Report Share Posted July 17, 2015 Can you describe in detail what is happening and what you wanted it to do? Quote Link to post Share on other sites
hmcdowell 0 Posted July 18, 2015 Author Report Share Posted July 18, 2015 Can you describe in detail what is happening and what you wanted it to do? Quote Link to post Share on other sites
hmcdowell 0 Posted July 18, 2015 Author Report Share Posted July 18, 2015 Hello, thanks for the reply, I have had this same question floating around different place online for weeks and no one has taken the time to reply on it. After filling out the form, when I click on the "submit", I would like the data (name, e-mail address, subject and comment) to be sent to an e-mail address which is in defined in the top of the PHP coding "("RECIPIENT_EMAIL", heathmcdowell@yahoo.com). However when I click "submit" it says - "There was a problem sending your message. Please try again. Please close this tab/window, refresh the "contact us" page and try again. Which is what is suppose to happen if there is an error sending. But there shouldn't be any kind of error unless its in the coding. This is the page that the form is currently on for testing, www.nvaministries.org/nvaministries/contact/contact.html Thanks for all the help! Quote Link to post Share on other sites
dsonesuk 913 Posted July 18, 2015 Report Share Posted July 18, 2015 It works for me, but define( "EMAIL_SUBJECT", "$subject" ); Will give you $subject is undefined message, but you don't require this defined constant anyway as it retrieved from input 'subject' form submission and even though you have this error it still sends the email anyway. Quote Link to post Share on other sites
hmcdowell 0 Posted July 18, 2015 Author Report Share Posted July 18, 2015 It works for me, but define( "EMAIL_SUBJECT", "$subject" ); Will give you $subject is undefined message, but you don't require this defined constant anyway as it retrieved from input 'subject' form submission and even though you have this error it still sends the email anyway. Thanks dsonesuk, after I took the subject line out it started to work just fine. I think that might have been the problem. You guys are great! Quote Link to post Share on other sites
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.