The code up till this point. Bit messy. Horrible SQL injection vulnerabilities.