hmcdowell Posted July 17, 2015 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 Link to comment Share on other sites More sharing options...
Ingolme Posted July 17, 2015 Share Posted July 17, 2015 Can you describe in detail what is happening and what you wanted it to do? Link to comment Share on other sites More sharing options...
hmcdowell Posted July 18, 2015 Author Share Posted July 18, 2015 Can you describe in detail what is happening and what you wanted it to do? Link to comment Share on other sites More sharing options...
hmcdowell Posted July 18, 2015 Author 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! Link to comment Share on other sites More sharing options...
dsonesuk Posted July 18, 2015 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. Link to comment Share on other sites More sharing options...
hmcdowell Posted July 18, 2015 Author 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now