By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,783 Members | 1,286 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,783 IT Pros & Developers. It's quick & easy.

help with mysql errors

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.