Forums

Disable user after from is send

Quevi2008 29 Oct, 2010
Hi,

I want to create a voting form.

Each (registered) user should be able to vote once.

After he voted, his username should be disabled.

How can I make this work?
GreyHead 29 Oct, 2010
Hi Quevi2008,

If they aren't logged in, hide the form from them. In the form HTML check the current user id against the list of recorded votes and hide the form (with a polite message) if their vote is already recorded.

Search here for getUser for many code snippets.

Bob
This topic is locked and no more replies can be posted.