Good day!
So, we are talking about the payment system (for personal needs). The encrypted $ _GET is sent to the "success" page with parameters, I compare the parameters, if everything is fine, I save it to the database, only it saves it twice, why can this happen?
In short, the code is approximately as follows:
if( $params['status'] == 1){ $email = $params['email']; $link = mysqli_connect("localhost", "xxx", "xxx", "xxx"); $insert = 'INSERT INTO xxx (email) VALUES ("'.$email.'")'; $query = mysqli_query($link, $insert) or die(mysqli_error($link)); } How can I check if the data went to not send twice? Thank!