LostAndConfused Posted December 16, 2008 Share Posted December 16, 2008 Hello, I have been playing a new game lately called Phoenix Dynasty and a guild in that game invited me and found out I have *some* knowledge about websites. They asked me to make them a website (for the guild) that MUST have a login/account system built in... Well I found one online and now i'm trying to add it to my webpages i had already made. I tried the system itself (on mostly blank php pages) and it DOES work. After setting it all up I went to change a few small things and I think I broke something somewhere. My scripting skills arn't bad but i'm not very knowledgeable about php so I may have made some structure or grammer mistakes somewhere. Can somebody check this piece and tell me if it looks ok? It's for registering new accounts. It started out with just username, password, and email fields and I wanted to add 3 more. I added the 3 new ones to MySQL but everytime I go to sign up now, it returns Registration Failed for some reason. Maybe it's a problem with MySQL but this is the biggest part I changed which seems to work but may have bugs... Can somebody please check it for me? Please check the added codes between lines... 301~338 if it is all correct, can you possibly tell me what makes it return failed? [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/ Share on other sites More sharing options...
waterssaz Posted December 16, 2008 Share Posted December 16, 2008 did you also change the $database->addNewUser() to accomodate your extra fields? Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/#findComment-716585 Share on other sites More sharing options...
9three Posted December 16, 2008 Share Posted December 16, 2008 Line 309: You have too many parenthesis. Line 322: You have too many parenthesis. Line 335: You have too many parenthesis. Check your MySQL to make sure you added the proper field names for each additional "class" you added. Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/#findComment-716597 Share on other sites More sharing options...
LostAndConfused Posted December 16, 2008 Author Share Posted December 16, 2008 Wow that actually fixed it. I didn't notice the changes I needed in database.php... 9three, can you tell me the correct way of fixing those "too many parenthesis" errors? I signed up but when I checked it on MySQL, the major and minor fields somehow got switched? Any idea what could have caused that? I doubled checked all the edits I made and I don't have any wrong majors where minor should be or minors where majors should be...ect... also, I went to go login now that it said success but it says invalid password ??? I didn't change anything related to the password so what could be wrong? Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/#findComment-716601 Share on other sites More sharing options...
waterssaz Posted December 16, 2008 Share Posted December 16, 2008 are you inserting them in the correct order in your sql query? Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/#findComment-716608 Share on other sites More sharing options...
LostAndConfused Posted December 16, 2008 Author Share Posted December 16, 2008 sweet! Ok fixed the backwards major/minor thing and also the password thing (i guess i lowered the limit in MySQL) so now everything looks perfect, although I never got the confirmation emails from me signing up... any ideas on that? (also still need to fix the parenthesis thing still) Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/#findComment-716617 Share on other sites More sharing options...
waterssaz Posted December 16, 2008 Share Posted December 16, 2008 Ok here are afew pointers: 1:On line 309 remove first 2 (( and last 22 as these are just excess. 2:On line 322 and 335 remove first and last 4 (. 3: Have you defined the constant EMAIL_WELCOME correctly? (ie you haven't set it to false by default) 4: Check your mailer class so that you have set up your email settings correctly and that the email function is being passed the expected amount of parameters. Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/#findComment-716624 Share on other sites More sharing options...
LostAndConfused Posted December 16, 2008 Author Share Posted December 16, 2008 lol omg i don't know how you did it but you've solved all my problems. i'll definitely come back here next time i break something... TY sooo much. Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/#findComment-716626 Share on other sites More sharing options...
waterssaz Posted December 16, 2008 Share Posted December 16, 2008 no problem, glad I could help Link to comment https://forums.phpfreaks.com/topic/137184-adding-login-system-to-a-website/#findComment-716636 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.