Ok, I have searched the forums for the past few days trying to find the answer to my problem.
I have a form where people subscribe to an event. However, it is possible in its current form to sign up for the event with the same details twice or more. This is a pain as some people have a habit of signing up more than once, normally because they forget.
I would like to have the form check the the person's details are not in the database already for the event. And for it to return a statement saying that they have already signed up for the event.
I know that I have to perform a MYSQL query and that it would look something like this but I don't know how to implement it on the form.
Also where would I add it to the code.
I am very new to php and I don't have much experience. So any help will be appreciated
I have a form where people subscribe to an event. However, it is possible in its current form to sign up for the event with the same details twice or more. This is a pain as some people have a habit of signing up more than once, normally because they forget.
I would like to have the form check the the person's details are not in the database already for the event. And for it to return a statement saying that they have already signed up for the event.
I know that I have to perform a MYSQL query and that it would look something like this but I don't know how to implement it on the form.
SELECT * FROM $table_name WHERE date = '$date_chosen' AND email = '$email_given' ;
Also where would I add it to the code.
I am very new to php and I don't have much experience. So any help will be appreciated