Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2007
    Posts
    3
    Tokens
    0

    Default Connecting To MYSQL Database~~~~~ Help For my RPG Gangster Game

    hey people,

    i'am looking for someone to help me on my rpg php gangster game. I cannot set it up. I'am looking someone who can fix it if they fix it i will let them be co-owner of my website and i will give all rites throughout.


    The problem is connecting to the mysql database.

    Message Me If Intrested

    Thanks

    Joe (iWeb)

  2. #2
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    Noone will help you if you spam.

    Post what you're problem is.

  3. #3
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by iweb View Post
    The problem is connecting to the mysql database.
    No, the problem is: You don't know PHP.

    Connecting to a database is the first thing i learnt, par echo etc

    And why would anyone want co-owner when you would be doing nothing technical and claiming part ownership.

    Besides theres are loads of RPGs around. Chav Wars is a good one haha.

  4. #4
    Join Date
    Dec 2008
    Location
    England, Hampshire
    Posts
    142
    Tokens
    0

    Default

    Quote Originally Posted by Jackboy View Post
    No, the problem is: You don't know PHP.

    Connecting to a database is the first thing i learnt, par echo etc

    And why would anyone want co-owner when you would be doing nothing technical and claiming part ownership.

    Besides theres are loads of RPGs around. Chav Wars is a good one haha.
    Exactly. Just learn some basic PHP online and you'll be able to do it yourself, there is no point trying to run a website if you cannot understand how to fix basic PHP errors.

  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    No, the problem is: You don't know PHP.

    Connecting to a database is the first thing i learnt, par echo etc

    And why would anyone want co-owner when you would be doing nothing technical and claiming part ownership.

    Besides theres are loads of RPGs around. Chav Wars is a good one haha.
    It pisses me off when I see people who have no reputation, and nothing to back it up, flaming people.. like you.

    You can't code PHP either.. you're not much higher then him on the ladder, so what gives you the right to start flaming him? With nothing to back it up.

    He's just looking for some help fixing his problem, if you're not going to help him.. then why flame and post like that? He didn't ask for your opinion on it really.. he just asked for help.

    --------------------

    @op: Could you elaborate on your problem a little bit more? If you're using a "pre-made" RPG game.. could you tell us which one?

    Surely it came with some instructions, it's most likely in a configuration file, be looking for that.. and make sure you've setup your database and user.

  6. #6
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    It pisses me off when I see people who have no reputation, and nothing to back it up, flaming people.. like you.

    You can't code PHP either.. you're not much higher then him on the ladder, so what gives you the right to start flaming him? With nothing to back it up.

    He's just looking for some help fixing his problem, if you're not going to help him.. then why flame and post like that? He didn't ask for your opinion on it really.. he just asked for help.
    LOL. Okay fair dos on the no opinion part of it. But how can you say I can't code PHP rofl. I don't have any trouble coding PHP and i do OOP tbh. I thought you were actually decent Caleb but you're a bit of a pfft

    The only coding i actually struggle with is javascript. I am fine with PHP and I am at the level I hope to be.

    And how the hell can you say I'm not much higher than him on the ladder? I can connect to a database. I will show you some of my code someone.

  7. #7
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Hey, I try to code in OOP and do things a little more complicated, here's the basic's of how to use mysql_connect() and mysql_select_db()

    PHP Code:
    <?php 
    // Just remember, never use short tags. A lot of coders fall into this habbit
    // And it is terribly evil. (Short tags being <? without the "php" after it.
    mysql_connect'hostname''username''password' );
    mysql_select_db'database_name' );
    ?>
    mysql_connect()'s first parameter is the hostname, so that would be 'localhost' if you are running your database from the same server (Basically, if you use a control panel like cPanel and your database is in cPanel then you would add the hostname as 'localhost')

    The second parameter is the username, on panels like cPanel they add your cPanel username and then the username you chose for your database, so for example you create a username for it of "cheese" and your cPanel username is "lolcats" then the username you would enter is "lolcats_cheese"

    The third parameter for mysql_connect() is the password, there is no prefix for this, just add your password that you used to create the database.

    Now for mysql_select_db()..

    This function only has one parameter, again if you use a control panel like cPanel it's likely to add a prefix in front of your database name, example: cPanel username: "lolcats" and your database name: "coredb" then you would enter "lolcats_coredb"

    Below is an example of the example's put into one..

    PHP Code:
    <?php
    mysql_connect
    'localhost''lolcats_cheese''somepassword' );
    mysql_select_db'lolcats_coredb' );
    ?>
    Just to let you know, when you're making your database you should give it full permissions, otherwise you will be unable to do things when you start creating your script.

    This was probably way to complicated, but I hope it helps.

  8. #8
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    ooo good mini tutorial calon that will be useful to new programmers +rep if i can

  9. #9
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Machoo View Post
    ooo good mini tutorial calon that will be useful to new programmers +rep if i can
    Lol, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •