|
Posted by Kingman on 09/30/05 20:38
Current error mesage:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL
result resource in /home/dors/www/dors/data/data.php on line 96
Table 'dors.d_vars' doesn't exist
Current code snippet:(I seperated out line 96 to make it easier to
find. I also added the exit line to try and figure out what was going
on. All of this code worked until we moved it to a new dedicated
server.
Will greatly appreciate any and all assistance.
<?
session_start();
$Data_Mailer_Version = "3.21";
#########################################
include("config.inc");
//include("/home/dataphp/global_vars.inc");
include("dataphp/global_vars.inc");
#
# Check for actions
#
if(!$mailformDatabase) {
if( ($image == "counter") && ($route_id > 0) ) {
log_counter_and_display_blank_image();
exit;
}
if( ($link) && ($route_id > 0) ) {
log_link_and_forward();
exit;
}
if($action == "login") { login(); }
if($action == "logout") {
session_register("datases");
$datases = "";
login();
}
if($action == "menu") {
check_login();
session_register("datases");
$datases = $username;
session_register("datases");
if(!$menu) { $menu="massmail"; }
display_menu();
}
if($update_config) {
check_login_sess();
update_config();
}
if($download_bounce) {
check_login_sess();
download_bounce_database();
}
if($menu) {
check_login_sess();
display_menu();
}
if($download_database) {
check_login_sess();
download_database();
}
if($set_errchecks) {
check_login_sess();
set_errchecks();
}
if($Create_Template_RTF_File) {
check_login_sess();
Create_Template_RTF_File();
}
$tables=mysql_list_tables($dbDataBase);
while (list($dbcheck)=mysql_fetch_array($tables)) {
if(!(preg_match("/^d_/", $dbcheck))) {
$d_newmuiltivar = "r_$dbcheck";
if($$d_newmuiltivar) { remove_account(); }
}
}
}
#
# Check for submitted form
#
if($mailformDatabase) {
#
# Check For Required Fields
#
// Seek Database For d_vars errcheck
$result = mysql_query("select count(varname) from d_vars where varname
like 'errcheck_%'");
LINE 96
$d_dvars_errcheckrow = mysql_fetch_assoc($result);
exit(mysql_error());
if($d_dvars_errcheckrow["count(varname)"] > 0) { $d_vars_errcheck=1; }
else { $d_vars_errcheck=0; }
while ( list($name, $value) = each($HTTP_POST_VARS) )
{
// Required?
if(preg_match("/^Req_/", $name)) {
$name = preg_replace("/^Req_/", "", $name);
if(!$value) { $errors .= "<li><b>$name</b> is Required!<br>\n"; }
}
// In Database Error Check?
if($d_vars_errcheck) {
if(preg_match("/^mailformuseremail/i", $name)) { $name = "email"; }
$d_error_check_results = check_errcheck_database($name, $value);
if($d_error_check_results != 1) { $errors .= $d_error_check_results;
}
}
// SQL Key Word?
if(in_array(strtolower($name), $d_sql_cmds)) { $errors .= "<li>The
field name '<b>$name</b>' cannot be used, SQL Command!<br>\n"; }
}
// Database Name SQL Key Word?
if(in_array(strtolower($mailformDatabase), $d_sql_cmds)) { $errors .=
"<li>The database name '<b>$mailformDatabase</b>' cannot be used, SQL
Command!<br>\n"; }
if($errors) { error_page($errors); }
$mailformDatabase = preg_replace("/\./","_",$mailformDatabase); #No
Dots!!
$tables=mysql_list_tables($dbDataBase);
while (list($dbcheck)=mysql_fetch_array($tables)) {
if(!(preg_match("/^d_/", $dbcheck))) {
if($mailformDatabase == $dbcheck) { $datafound=1; }
}
}
Navigation:
[Reply to this message]
|