Anyway, without further delay...
System Revamp v.1
I just got finished watching all the videos yesterday and over the night I had designed a new register/login system that I will be using on my project. I was going to release that at first, but since I used different variables/tables and this should be as newbie friendly as possible... I took extra time to convert the forms for the original release (the one for videos 19-20) to my system.
This is almost 100% tested to work and I even fixed a couple of bugs that were present.
Installation: Either unzip this folder in the location of the old scripts or create a new folder for it. <<The Folder>>
If you do the former, overwrite everything.
Also, make a table called 'tutorial' in your database and import the tutorial.sql file. I recommend deleting the old 'tutorial' table if it exists.
Finally, make sure that connect.php has the correct information to connect to your database.
Features:
- New register system: Complete error handler (shows all errors the user made and places the register form back under the error box so they can fix them), more easily CSS customizable, easy to change character limits on passwords and usernames, remembers what the user typed if an error pops up, and now all on one page. (You can delete reguser.php) [New CSS: #reg_page, #reg_form, and #reg_error]
- *new Email verification: Got a script to validate email addresses. It's possible for wrong/less used domains to take awhile to load but worked perfectly for me.
- New login system: Now when you go to index.php, it will check if you're logged in and if you aren't, it will bring up the login form on that page. Let's face it. When people first come to your site you'll want them to be able to login or register somewhere on the first page and now that the login box is in a div on the first page, you can put it anywhere with CSS easily. (Once again on one page. You can delete authenticate.php) [New CSS: #login and deleted #login2]
- New page - game.php: This is where the actual game happens. You really don't want it to be on the homepage anyway. Everything from the old index.php was moved here and all links to index.php were changed to go here for you.
- Auto-redirect: When you go to index.php while logged in, it immediately takes you to game.php. Likewise, if you're not logged in and go to game.php, it immediately sends you to index.php so you can log in. No prompts or warnings. It just takes care of it.
- All changes fully commented: index.php, login.php, register.php, and game.php are now fully commented everywhere that I made changes. That way you can see what the code is doing and what you can easily change.
- Registration didn't set the player's location so I fixed that. It's set to Crocania currently. You can change it.
- Fixed tutorial.sql to have the location column for creatures.
- Fixed battle.php isssue where creatures wouldn't show up. It was a case of not getting the location of the player AND the creatures having no locations. (Make new creatures. The current 2 are technically taken I think.)
- Fixed a line in newitem.php. I have no idea what the script does... just that my IDE told me it was missing a semi-colon.
- Um... forgot any others.
[Screenshot 1] [Screenshot 2] [Screenshot 3] [Screenshot 4]
* This update wasn't very visual so mostly showing off the error handler on the registration page and the changed URLs.