Ok guys, this problem has been driving me nuts for hours and I was hoping someone would have a solution for me. I'm sure it's a stupid mistake on my part, but any help would be appreciated.

Basically this script will take input from the form within it and add it to the database. This isn't the full script because I'm having problem accessing the database, thought that should be taken care of first.

The pass.inc included file contains the database connection as the variable $cnx. So I run the script, input my information and press Submit and I receive the following message from my browser:
Warning: 0 is not a MySQL link index in /home/corby/justforwebmasters-www/be/admin/addauthor.php3 on line 33
Couldn't select database.

Any ideas? And thanks in advance!

PHP Code:
<?php

include("/home/corby/php/pass.inc");
include(
"/home/corby/www/be/admin/functions.php3");
$db_name "justforwebmasters_com";
$table_name "Authors";

function 
printForm()
{        
// Prints out HTML form to allow user to create new author account.

    
$scriptaddress "http://" getenv("HTTP_HOST") . getenv("SCRIPT_NAME");
    
    print 
"<form action=\"$scriptaddress\" method=\"post\">\n";
    print 
"<table align=\"center\" border=0 cellpadding=5 bgcolor=\"black\">\n";
    print 
"<tr><td valign=\"top\" bgcolor=\"white\">Author Name:</td>\n";
    print 
"<td valign=\"top\" bgcolor=\"white\"><INPUT TYPE=\"text\" NAME=\"authorname\" size=\"40\" value=\"$authorname\"></td></tr>\n";
    print 
"<tr><td valign=\"top\" bgcolor=\"white\">Author Email:</td>\n";
      print 
"<td valign=\"top\" bgcolor=\"white\"><INPUT TYPE=\"text\" NAME=\"authoremail\" size=\"40\" value=\"$authoremail\"></td></tr>\n";
    print 
"<tr><td valign=\"top\" bgcolor=\"white\">Author Byline:</td>\n";
    print 
"<td valign=\"top\" bgcolor=\"white\"><TEXTAREA NAME=\"authorbyline\" ROWS=\"3\" COLS=\"35\" value=\"$authorbyline\"></TEXTAREA></td></tr>\n";
    print 
"<tr><td valign=\"top\" bgcolor=\"white\" colspan=\"2\">\n";
    print 
"<center><input type=\"hidden\" name=\"page1\" value=\"1\"><input type=\"reset\"> <input type=\"submit\"></center>\n";
    print 
"</td></tr></table></FORM>\n";
}

function 
errorCheck()
{
    print 
"Checking for any errors";
}

function 
databaseEntry()
{        
// Inserts records into database
    
$db mysql_select_db($db_name$cnx) or die("Couldn't select database.");
    
$sql "INSERT INTO $table_name (Name, Email, Byline) VALUES ($authorname$authoremail$authorbyline)";
    
$result mysql_query($sql,$cnx) or die("Could not execute query. The error is on the SQL or connection line.");

    print 
"Successful!";
}

if(
$page1)
{
    
errorCheck();
    
databaseEntry();
}
else
{
    
printHeader("JustForWebmasters.com: Add New Author""Add New Author");
    
printForm();
    
printFooter();
}

?>