Setup Tutorial

This tutorial will show you how to setup HabboSQL. For optimal preformance, we 
are going to use XAMPP as our MySQL host so it can be on the same PC as HabboSQL.

1. Download the XAMPP Installer here:
http://www.apachefriends.org/download.php?xampp-win32-1.6.2-installer.exe

1b. Download the MySQL Connecter installer here:
http://dev.mysql.com/downloads/connector/odbc/3.51.html

2. Follow the instructions, and install to the default directory.
(Install MySQL and Apache as a service!!)

3. Start the XAMPP control panel and make sure MySQL and Apache are running

4. If all went good, go to http://localhost. Click your language, then click phpMyAdmin
on the bottom left hand corner.

5. Once phpMyAdmin is loaded, click Privileges, then click Add New User.

6. In the Username textfeild, enter your desired username. In this example, we will use HabSQL.

7. Leave the host field blank, then enter your desired password in the password and retype feild.
In this example, it will be habbo.

8. Click Check All, then click Go. The user will be added.

9. Once thats done, click the Databases tab at the top. 

10. At the bottom, where it says New database, put in your desired database name.
In this example, we will use Database1.

11. You are now in the database. Click the Import tab at the top, then click browse. 
Open the .SQL file. Click Go.

12. Your database is now all setup. Go to the HabboSQL folder, then open to misc_files/mysql.ini.

13. You will see the following:

[SQL]
server=localhost
database=
username=
password=
port=3306

14. Fill in all the information with all the stuff you have just created. This is how it would look if
you used the example information in this tutorial:

[SQL]
server=localhost
database=Database1
username=HabSQL
password=habbo
port=3306

15. Save and close the file. Then run HabboSQL.exe

16. Enter your HabboSQL registration information in the login box below. Checking Remember me
is highly recommended. Click Login.

17. If your information is correct, it will show the main interface.

18. If HabboSQL connected successfully, you should see Connection Successful in the Last Query Box, OR you
 should see a MySQL query. If it says Connecting to Database... That means your MySQL information is incorrect. 
If you receive an error, you do not have the MySQL connector, see step 1b.

19. Now, we need to setup the login files. In this tutorial, we will have them use Apache. If you need to host the
login files on a diffrent place other then where HabboSQL is, you need to edit the hostname from localhost
to the pc using HabboSQL's IP. You also need to port forward 3306 (MySQL port).

20. Copy the SSO Files folder and put it into C:\xampp\htdocs, rename the SSO Files folder to login

21. Open up hotel.php and register_sub.php in notepad. Look for these two lines in both files:

	mysql_connect("localhost", "USER", "PASS") or die(mysql_error());
	mysql_select_db("DB") or die(mysql_error());

22. Edit these two lines to your MySQL Settings. This is how it would look if you used the example
information in this tutorial:

	mysql_connect("localhost", "HabSQL", "habbo") or die(mysql_error());
	mysql_select_db("Database1") or die(mysql_error());

23. Then, in hotel.php, look for YOURIP, and YOURPORT. It will be displayed twice. Change YOURIP to 
localhost and YOURPORT to 1232.

24. Save the files and close them. Run the server, then go to http://localhost/login

25. Try registering. After the page where you fill out your info, if you receive Registration Successful, then
your MySQL info is correct, and everything is setup. If you receive a MySQL error, your information is wrong, 
or it cannot connect to the database. Check your info.

26. Go to the login page, and enter your info you registered with. If all goes well, the loader should show, and
log you in automatically with SSO. This means you are done, and the rest is up to you. 

Good luck with your new retro!

NOTE: The logni files included with HabboSQL are simple login and register files. They are just to show
how logging in and registration works. It is your job to edit them to your liking or add new features that edit or
grab certain information from the habbo's table.