the mail() function
4 posts • Page 1 of 1
I need to send Email from a html form. I did it with php mail function, but I don't want the server to send a new html page, I want to stay with the first html page (where the form was written). How can I do that?
Do you care if page is reloaded? Because you can have self processing page, where the form action is the same page, and then in the page just check if (isset($_POST)) and handle form data if it is. If you're trying to avoid server requests, ajax is the way to go because you can update just the relevant portion of the page. or if you just want to leave the form up after completion, you can have a self processing page that populates the form fields with the post data when its responding to a post. without seeing your code or knowing exactly what you're going for all we can do is guess
Who is online
Users browsing this forum: No registered users and 2 guests