Photo Contest voting lookup
Hello,
I have been struggling with this part of the site.
I have a voting site (www.dogpediccontest.com) where people after registering can upload their pets picture and vote for their pet. I was able to get this to work.
I need help with the voting end. I have it set up where the person (friends, family, etc) registers then is taken to a protected page (registrants by email only). Here I need to allow them to see all the photos and names and a button to allow them to vote. They can only vote once per email address, so once they vote they would not be able to see this page.
I have one table (I was out of time so i am only using this now):
users: UserID, UserEmail, UserPassword, UserFirstName, UserLastName, PetName, PetImage, ContestTerms, PetVotes, UserEmailVerified, UserRegistrationDate, UserVerificationCode, UserIP, UserPhone
and votes: VoteID, VoteUserID, PetVotes, petName, VoteDate
My question is; Are the tables set up right? What is the correct SQL statement to allow me to show all the pet names, pictures and allow the registered user to vote?
The site had to go live and I am beyond having a gun to my head, so any help would be greatly appreciated.
Thanks,
Rob
Thanks,
Rob