Counting using a Session Variables?
Hello!
Can anyone help me with the following problem?
At the moment I have a form where a customer can request a catalogue. On submission the info is inserted into a database and an email is sent to me so I can action their request. At the moment there is nothing stopping someone entering in their details x amount of times and in theory getting x amount of catalogues sent to them.
I would like to be able to put a limit of 3 catalogue requests per session so that, after the 3rd time, an email is not sent to me and a message appears on screen to say "you've had enough!".
Does anyone know how I would add this functionality into my existing code? At the moment the form is on one page, the info get submitted to a process page where the email is also sent out and they are redirected to a 'thank you page' afterwards.
I know that if a user closed down their browser and started again they could order more catalogues but i'm more interested in stopping the users from going this in one go.
Thanks in advance
Lucy
|