Skip navigation links

MySQL Forums :: PHP :: Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/jrproduc/public_html/dommailinglist.php on line 39


Advanced Search

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource
Posted by: James Holmes ()
Date: May 10, 2008 09:32PM

Ok, now this is what i got this message....

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

If I was to take out line 69 it works but it dont put the info into my database.


<?php include(/Connections/dommailinglist.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;


switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;


switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO users (email) VALUES (%s)",
GetSQLValueString($_POST['email'], "text"));

mysql_connect (LOCALHOST, jrproduc_dom, asia24);
$Result1 = mysql_query($insertSQL, $dommailinglist) or die(mysql_error());
}

?>

Thank you for your help.

Options: ReplyQuote


Subject Written By Posted
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/jrproduc/public_html/dommailinglist.php on line 39 James Holmes 05/09/2008 09:13PM
Re: Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/jrproduc/public_html/dommailinglist.php on line 39 Peter Brawley 05/10/2008 09:57AM
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource James Holmes 05/10/2008 09:32PM
Re: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource Peter Brawley 05/10/2008 10:31PM
Re: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource James Holmes 05/11/2008 10:13PM
Re: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource Vijayakumar R 05/12/2008 06:39AM
Warning: Wrong parameter count for mysql_query() James Holmes 05/12/2008 07:50PM
Re: Warning: Wrong parameter count for mysql_query() Peter Brawley 05/12/2008 10:06PM
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dom'@'localhost' (using password: YES) James Holmes 05/13/2008 08:48AM
Re: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dom'@'localhost' (using password: YES) Peter Brawley 05/13/2008 09:56AM
Re: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dom'@'localhost' (using password: YES) James Holmes 05/14/2008 12:21AM
Re: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dom'@'localhost' (using password: YES) Jean Molliné 05/14/2008 01:46AM
Re: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dom'@'localhost' (using password: YES) James Holmes 05/14/2008 10:30AM
Re: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dom'@'localhost' (using password: YES) Jean Molliné 05/14/2008 11:07AM
Re: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dom'@'localhost' (using password: YES) James Holmes 05/14/2008 03:35PM
Re: Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/jrproduc/public_html/dommailinglist.php on line 39 Jean Molliné 05/11/2008 11:47PM
Re: Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/jrproduc/public_html/dommailinglist.php on line 39 Vijayakumar R 05/12/2008 06:06AM
Re: Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/jrproduc/public_html/dommailinglist.php on line 39 Jean Molliné 05/12/2008 09:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.