I want to create a fairly simple math captcha that randomly outputs a math question, then stores the answer in the DB along with a unique ID for the user. This all works, but for some reason, no matter what answer I give when testing, it always fails and says “wrong answer”. I got the same error when doing it with sessions (weird?). I prefer mysql though. I’m at wits end. If anyway could help, I’d greatly appreciate it! Here is the full code: php captcha - Pastebin.com
Thanks!