1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

new game im hoping to make.

Discussion in 'Entertainment and Technology' started by fallendream, Dec 19, 2009.

  1. fallendream

    Full Member

    Joined:
    Jan 1, 2009
    Messages:
    715
    Likes Received:
    0
    im currently trying to make a game in php with mysql (i hear i need these) and i was wondering if anyone had any tips?

    itll be a text-based game where energy is spent to train skills and get items.

    also, are there any good php, mysql etc. tutorials i should see?
     
  2. Swamp56

    Swamp56 Guest

    I sent you a PM with links to all of the PHP Tutorials I've made. I suggest you take a look here to see the syntactical structure of MySQL.

    There are zillions of PHP tutorials out there, but this guy introduces PHP in a way that allows you to understand what you are doing. Note that his syntax is terrible though.

    You can use the MySQLi driver class in PHP to connect to a database like so:

    PHP:
    $db = new mysqli('localhost''userName''password''dbName');
    In order to use the instantiated class inside the $db variable, you simply utilize it like any class:

    PHP:
    $db->query("SELECT * FROM `someTable`");
    Other functions like mysqli_fetch_array are also useful in selecting data from the query and reverting it into an array. You can check out a sypnosis of the methods within the MySQLi driver class here. If you need any help, just pm me.
     
    #2 Swamp56, Dec 19, 2009
    Last edited by a moderator: Dec 19, 2009