shadowdemon 0 Report post Posted September 27, 2005 i may be bugging people with this but wats wrong with this code $db = mysql_select_db("shadow_member",$connection) or die ("couldn't select databse."); i enetered this code in another code so it would connect to the datavase were the table is but i got this message when i tested it outWarning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/shadow/public_html/join.php on line 13couldn't select databse. Share this post Link to post Share on other sites
SystemWisdom 0 Report post Posted September 27, 2005 Well, it sounds like you have not made a connection to the database yet... Have you called the mysql_connect() function? And have you passed it valid parameters??You should do something like: $connection = mysql_connect( "server", "username", "password" );$db = mysql_select_db( "shadow_member", $connection ) or die ("couldn't select databse."); I hope that helps!!Oh, and if you have used the connect statement already, then make sure it is correct.. Share this post Link to post Share on other sites
saga 0 Report post Posted September 27, 2005 here is the code that realy works for me and im assuming for everybody too of course..mysql_connect('localhost', 'username', 'password');mysql_select_db('database');so the error is you put 2 arguments to the function mysql_select_db()when it only need one..its a better idea too to use single qoutation mark to speed up compiling Share this post Link to post Share on other sites
shadowdemon 0 Report post Posted September 27, 2005 thanks ill try these and get back with u with my results i think i figured out wat i did wrong tho i think i used the wrong username and pass but ill check Share this post Link to post Share on other sites
shadowdemon 0 Report post Posted September 27, 2005 i used the second one and got this errorWarning: mysql_connect(): Access denied for user: 'shadow_members@localhost' (Using password: YES) in /home/shadow/public_html/join.php on line 13and im gonna try the first one Share this post Link to post Share on other sites
shadowdemon 0 Report post Posted September 27, 2005 and for the first one wat do i replace with server (not sure wat u mean by server) Share this post Link to post Share on other sites
truefusion 3 Report post Posted September 27, 2005 Server is usually "localhost". Like post #3 has it. Share this post Link to post Share on other sites
saga 0 Report post Posted September 27, 2005 yeah you should used 'localhost' if the mysql you are connecting is not in some other server in the web but in your webhost server. if your are using mysql in Xisto webhosting use 'localhost' as server, your cpanel name as user and your cpanel password as password. That should work. Share this post Link to post Share on other sites
shadowdemon 0 Report post Posted September 27, 2005 k and local host does that include the number Share this post Link to post Share on other sites
shadowdemon 0 Report post Posted September 27, 2005 i pout in local host and it doesnt work am i suppose to make a new one or something Share this post Link to post Share on other sites