SitePoint Sponsor

User Tag List

Page 4 of 4 FirstFirst 1234
Results 76 to 86 of 86
  1. #76
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I tried that and now get the following at signup.php:

    Parse error: parse error in /path/path/path/db.php on line 17

    Any ideas?

  2. #77
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now what?

  3. #78
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nothing?

  4. #79
    SitePoint Enthusiast
    Join Date
    Dec 2001
    Location
    Romania
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what's that line 17?

  5. #80
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Line 17 is:

    mysql_select_db($db, $dbcnx); or die(mysql_error());
    Any ideas? :O

  6. #81
    SitePoint Enthusiast
    Join Date
    Dec 2001
    Location
    Romania
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    remove ; before or

    PHP Code:
    mysql_select_db($db$dbcnx) or die(mysql_error()); 

  7. #82
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, did that, but when I try and register I still get:

    No Database Selected
    ANy ideas at this?

  8. #83
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, before somebody said to add a line into the places about $db..

    So is my db.php suppoed to be like this:

    PHP Code:
    <?php // db.php

    $dbhost "localhost";
    $dbuser "coaster_coastert";
    $dbpass "********";

    function 
    dbConnect($db="coaster_coasterthrills") {
    $db "coaster_coasterthrills"

        global 
    $db,$dbhost,$dbuser,$dbpass;

        

        
    $dbcnx mysql_connect($dbhost$dbuser$dbpass) or die(mysql_error());


        
    mysql_select_db($db$dbcnx) or die(mysql_error());

        

        return 
    $dbcnx;
    }

    ?>
    Like this:

    PHP Code:
    <?php // db.php

    $dbhost "localhost";
    $dbuser "coaster_coastert";
    $dbpass "********";

    function 
    dbConnect($db="") {
    $db "coaster_coasterthrills"

        global 
    $db,$dbhost,$dbuser,$dbpass;

        

        
    $dbcnx mysql_connect($dbhost$dbuser$dbpass) or die(mysql_error());


        
    mysql_select_db($db$dbcnx) or die(mysql_error());

        

        return 
    $dbcnx;
    }

    ?>
    Or like this:

    PHP Code:
    <?php // db.php

    $dbhost "localhost";
    $dbuser "coaster_coastert";
    $dbpass "********";

    function 
    dbConnect($db="coaster_coasterthrills") {

        global 
    $db,$dbhost,$dbuser,$dbpass;

        

        
    $dbcnx mysql_connect($dbhost$dbuser$dbpass) or die(mysql_error());


        
    mysql_select_db($db$dbcnx) or die(mysql_error());

        

        return 
    $dbcnx;
    }

    ?>
    I'm not sure which one I should use... right now I use teh first one!

  9. #84
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should I get the zips over now that the MySQL works and just use that?

    That I will try, it might work! :P

  10. #85
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AFTER ALL THIS, IT WORKS!

    Ok, after waiting and waiting for ever for responds here (and thank you for doing so after the worth while wait) I finally got it working!

    I think I did so much changing trying to get the MySQL to work, that I f'ed everything up!

    So, I got the files out of the zip again, and put the right details that I finally have, and it works!

    Thanks for everything all!
    ~someonewhois

  11. #86
    Non-Member GlobalFusion's Avatar
    Join Date
    Jul 2004
    Location
    globalfusion.com.au Google PageRank: 5
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dont you just hate when you have code that 'should' work, but doesnt?


Bookmarks

Posting Permissions

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