469,111 Members | 1,971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,111 developers. It's quick & easy.

help with mysql errors

I have these 3 errors and below are lines 17-19. Any suggestions what I
am forgetting?

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link
resource in /home/---/public_html/----/register2.php on line 17

Warning: mysql_query(): supplied argument is not a valid MySQL-Link
resource in /home/---/public_html/----/register2.php on line 18

Warning: mysql_close(): supplied argument is not a valid MySQL-Link
resource in /home/---/public_html/----/register2.php on line 19
16 $linkID = @mysql_connect("localhost", $username, $password);
17 mysql_select_db($dbname, $linkID);
18 $result = mysql_query("INSERT INTO alumni
(rank,firstname,lastname,email,passw,comments) VALUES
('$rank','$firstname','$lastname','$email','$passw ','$textarea')", $linkID);
19 mysql_close($linkID);

Jul 19 '05 #1
3 1911
aquilo at hotmail.com wrote:
I have these 3 errors and below are lines 17-19. Any suggestions what I
am forgetting? 16 $linkID = @mysql_connect("localhost", $username, $password);
17 mysql_select_db($dbname, $linkID);


You don't check for errors. MY guess would be that you fail to connect
to server and the $linkID has null value.

Jul 19 '05 #2
aquilo at hotmail.com wrote:
I have these 3 errors and below are lines 17-19. Any suggestions what I
am forgetting? 16 $linkID = @mysql_connect("localhost", $username, $password);
17 mysql_select_db($dbname, $linkID);


You don't check for errors. MY guess would be that you fail to connect
to server and the $linkID has null value.

Jul 19 '05 #3
aquilo at hotmail.com wrote:
I have these 3 errors and below are lines 17-19. Any suggestions what I
am forgetting? 16 $linkID = @mysql_connect("localhost", $username, $password);
17 mysql_select_db($dbname, $linkID);


You don't check for errors. MY guess would be that you fail to connect
to server and the $linkID has null value.

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Nic, Val, Vic, Mara, Ecs & Alc | last post: by
reply views Thread by Dafella | last post: by
16 posts views Thread by Angelos | last post: by
reply views Thread by Lenz Grimmer | last post: by
2 posts views Thread by trihanhcie | last post: by
reply views Thread by bob.herbst | last post: by
reply views Thread by PowerLifter1450 | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.