0

I have a contact form on my site. Once the user presses "submit", he is redirected to a page with a message. I want, instead for the user to stay on that contact page on my website, and have the message appear right there on the page. How do I do that? I dont know javascript/php, I copied the code fot the form from a tutorial.
The url to my site is: http://rejuvenateusa.org/contactr.html

2
Contributors
1
Reply
10
Views
3 Years
Discussion Span
Last Post by JorgeM
0

Well, if you want to handle all of that on the same page, rather than having a contact.html page, have a contact.php page instead. Then when the user clicks on the submit button, have the form post to the same page and have PHP code on that page that checks whether the page was submitted and if so, so something on the screen like the message you want to display. If the form was not submitted, then just show the regular form to display for the user.

For example, you can check to see if your submit button was clicked..

if(isset($_POST['submit-button-name']))

You will need to learn a little bit of PHP to get through this.

Edited by JorgeM

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.