473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 2045
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nic, Val, Vic, Mara, Ecs & Alc | last post by:
Does anyone know what's wrong with this code? I just started learning php & mysql from a book and this code is copied directly from it, yet it still fails to work... I always get the following...
0
by: Dafella | last post by:
The following is code from Xeoport. It is suppose to access my pop3 account and load email into Mysql database. It's not inserting and there is no log or anything to tell me why. Here is the...
16
by: Angelos | last post by:
I've seen this in php.net $r=@mysql_query($query,$MySQL); and I do not understand what would be the difference of this : $r=mysql_query($query,$MySQL); I mean what is the purpose of " =@ " ?...
0
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
0
by: bob.herbst | last post by:
I am trying to write a form that will add a guest to a guest table in a MySQL database and then reload the page to display any guests that have been added as well as redisplay the guest form to add...
0
by: PowerLifter1450 | last post by:
Hi everyone, hoepfully someone can help me with this problem, as I am new to Linux and not so sure how to troubleshoot this problem. I installed MySQL 4.1.21 on Fedora Core two without receiving...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.