Jump to content

JDWSLIPKNOT

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by JDWSLIPKNOT

  1. I need to know how to connect to a mysql database. I was working on the membership tutorial on the site and when it says to make a db.php I got stuck this is what i got though

    
    <?
    
    $db_name = "DBNAME"
    
    $connection = @mysql_connection("localhost", "USERNAME", "PASSWORD")
    
    or die(mysql_error());
    
    $db = @mysql_select_db($db_name, $connection) or die(mysql_error());
    
    ?>
    
    

     

    And this is what I get from that

     

    
    Parse error: parse error in /home/virtual/site37/fst/var/www/html/members/db.php on line 4
    
    
    
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtual/site37/fst/var/www/html/members/register.php on line 52
    
    
    
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtual/site37/fst/var/www/html/members/register.php on line 53
    
    No Database Selected
    
    

    Can anyone help me

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.