PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hello, guys. I'm using the following code to send me an automated mail in case the user find a broken link. But there are 2 problems: 1) after submitting I'd rather not disrupt their game by refreshing the page. So, is there any way to send mail without the post refreshing? 2) if the user hits F5, the page reloads and the code runs again, sending two or more times the same email. How can I avoid duplicated emails caused by manual browser refresh?
Unless you have a problem that is really easy to solve (or, in my case, fun to solve), then you likely won't get us to write the code for you. If you don't know how to use AJAX, the next step would be to find out how. If you don't know how to check for duplicates in a database... You look at what is being submitted, and compare it with the data that has already been submitted.
I've read a lot of post about this topic, and it's a common thing that happens to web developers. I think it must have an easy way to solve it, but I new in PHP and don't how to implement it. Besides, I'm not using a database, if you read the code you can see that the script only sends an automated email to me.
atomiccx wrote:I think it must have an easy way to solve it
[...]
I'm not using a database
If you've read a lot of posts, then you know that the most accepted format of handling multiple records of a similar format is to use the database. Besides... we already gave you solutions. All you have to do is Google it now.
atomiccx wrote:I new in PHP
[...]
if you read the code you can see [...]