Results 1 to 10 of 10

Thread: if you know mysql and php, please help!

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    82

    Unhappy if you know mysql and php, please help!

    this is suppost to connet to my database, and insert data into the table. but as far as it goes is connecting. after that it dies, it will not query the table add data or anything. It just dies! WHY!? It dies right there on the $db = @mysql_select($db_name, $connection) or die ("cannot select");


    Code:
    // database functions
    $db_name = "photos";
    $table_name = "data";
    $connection = @mysql_connect("localhost", "xxxxx", "xxxxx") or die ("cannot connect");
    
    $db = @mysql_select($db_name, $connection) or die ("cannot select");
    
    $sql = "
    INSERT INTO $table_name(set_id, locate, name)
    VALUES
    (\"$abox\", \"$bbox\", \"$cbox\")
    ";
    
    $result = @mysql_query($sql, $connection) or die ("cannot connect");
    
    ?>
    all this thing produces is cannot select.

    Does it matter that I have yet to set a user name and password for this stuff? I just use localhost nothing else. the x's here represent where t he user name and password should be.
    Last edited by evil_gamer; Oct 18th, 2001 at 02:06 AM.
    If you think I am wierd, then thats YOUR problem!

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

    I keep snakes and lizards, wanna know more? PM me

Posting Permissions

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



Click Here to Expand Forum to Full Width