That told me my problem. Thank you! I hadn't selected the database
in my connect include but had it in other scripts and not this one.
Long story but thanks for the help. I can stop banging my head now.
Jeff Oien

> on 5/9/01 12:29 PM, Jeff Oien at [EMAIL PROTECTED] wrote:
> 
> > Am I missing something?
> 
> yes. you aren't giving yourself any feedback about what happened when the
> insert failed.
> 
> instead of:
> 
> $sql = "INSERT INTO $table_name (First_Name, Last_Name)
> VALUES (\"Jeff\", \"Oien\")";
> $result = mysql_query($sql,$connection)  or die("Failed");
> 
> try:
> 
> $sql = "INSERT INTO $table_name (First_Name, Last_Name)
> VALUES (\"Jeff\", \"Oien\")";
> if(! $result = mysql_query($sql,$connection)) {
> 
>     print("ERROR ".mysql_errno().": ".mysql_error()."<br>\n$sql<br>\n");
> 
> }
> 
> also- i don't see your code for mysql_connect(). make sure you have a valid
> connection to mysql.
> 
> 
> 
> have a great day
> andy
> 
> -- 
> *******************************************************
> Andrew Rush :: Lead Systems Developer :: MaineToday.com
> *******************************************************
> 
> "A friend of the devil is a friend of mine" - R. Hunter
> 
> 
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to