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!


Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by GasFMatt View Post
    Listen calm down mate. He was replying on the code that he COULD see from what you posted. How are we meant to know about any functions etc... if you havn't listed or explained it. Don't be so narrow minded.
    Well unless you know absolutely nothing about php that wouldn't need to be explained.

  2. #12
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Are you been serious? Im sorry but your are been completly narrow minded for no reason now. I'll take some time to comment your original code so you can see how we would interp it:

    PHP Code:

    // You start the session, fair enough
    session_start();

    // You use THIS variable to connect to the mysql database
    $conn mysql_connect("localhost""user""password");

    //You use this function to select the database
    //HOWEVER what ever you put after the first , must
    //normally be the connection name you want it to affect
    //At this point we can ONLY see $conn and you call $connect
    //which is no-where to be seen.
    mysql_select_db("db""$connect") or die(mysql_error());

    //Can you see any functions been called there? 
    Last edited by Source; 12-07-2008 at 12:08 PM.


    www.fragme.co = a project.

  3. #13
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Can I ask what the point of a function is ($connect) when that parameter is just used to identify the MySQL connection?

    I understand if the $conn variable wasn't a line above and so you were using a function to identify the MySQL connection and return it. But there is absolutely no point when the code is a line above.

    Also, I'm not even sure if you can use a function for that parameter! I haven't really researched the mysql_select_db function as it's a very simple one..
    Last edited by Invent; 12-07-2008 at 12:12 PM.

  4. #14
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Exactly. He's got this mind-set that he is not wrong, just the php engine... At least thats what it seems like


    www.fragme.co = a project.

  5. #15
    NEW-START Guest

    Default

    Quote Originally Posted by GasFMatt View Post
    Exactly. He's got this mind-set that he is not wrong, just the php engine... At least thats what it seems like
    I actually quite like you. What was your previous name, if any?

  6. #16
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Just noticed what you was talking about as I was using $conn, should have called $conn instead of $connect, changed now. Worked before as it turns out I DID use numericals in my tables.

    Sorry for any inconvenience, just didn't notice.

  7. #17
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Always been GasFMatt, relativly a new kid on the block (Bad Expression I know)

    And thank god you realized excellent - it's the only way you can learn is by finding out what was wrong yourself.


    www.fragme.co = a project.

  8. #18
    NEW-START Guest

    Default

    Quote Originally Posted by GasFMatt View Post
    Always been GasFMatt, relativly a new kid on the block (Bad Expression I know)

    And thank god you realized excellent - it's the only way you can learn is by finding out what was wrong yourself.
    Ahh rightio.

  9. #19
    Join Date
    Jul 2008
    Posts
    16
    Tokens
    0

    Default

    PHP Code:
     <?php
    session_start
    ();
    $conn mysql_connect("localhost""user""password");
    mysql_select_db("db",$conn) or die(mysql_error());
    ?>
    Should be the fix, but you might not have the function installed or whatever, if you have php 5 i suggest you use PDO Class or MYSQLI


  10. #20
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Did you even read through the thread? It was fixed a page back.. nice of you to try and help though.


    www.fragme.co = a project.

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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