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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.