Think about this, I'm creating a code "363636". With this code, I'm giving the client the option to type in the input. However, I want this code to be executed only once. That is, when he type the code in the input, it's over !. If he passes this code to someone else using this script is no longer accepted. The code I made was as follows.
I created a variable called $ fill, with the coupon code.
$preenchimento = "363636"; // CUPOM
So I created another variable called coupon, where you get the variable
$cupom = $preenchimento // NÃO MEXER
In the form, I'm getting the information via $ _POST. That is, when the customer types the coupon it checks via. Always checking if the digital value matches the $ coupon variable:
if($tipodeinscricao == $cupom) {
echo "Cupom Validade";
}else{
echo "Cupom não validado";
}
The filetype $ directorytype is what is being taken from the client via $ _POST. As I've already said, I need the client to use this code only once, how can I do this?