The issue seems to be if I pull the userid and '$ia_arr[ID]' out it seems to insert everything just fine but as soon as I add the userid field it doesn't insert at all and
$res1 is empty.... $res is doing another insert into another data base is has the same probme with the ID field.
$res1 = db_resST( "INSERT INTO `user` (
`userid`,
`username`,
`password`,
`zip`,
`email`,
`lastvisit`,
`groupin`
)
VALUES
(
'$ia_arr[ID]',
'$ia_arr[NickName]',
'$ia_arr[Password]',
'$ia_arr[zip]',
'$ia_arr[Email]',
'$date_time',
'2'
)"
);
if ( $res OR $res1 ) {
return true;
}else{
return false;
}
The function for $res is my db.inc.php file has been unchanged and worked great for long time but if seeing the function helps...
It seems too weird because when one installes a new db with a php script it will need to insert data including indexed ID fields....mmmm
FUNCTION db_resST( $query, $error_checking = 1 )
{
GLOBAL $MySQLST;
$code = 103;
if ( !DEFINED( 'DB_VERM' ) OR DB_VERM == 0 )
$res = @mysql_query( $query, $MySQLST->link );
else $res = mysql_query( $query, $MySQLST->link );
if ( $error_checking && !$res ) {
$sqlerr = $_SERVER["PHP_SELF"]." : ". mysql_error();
$msg = error_messageST( $code, $query, $sqlerr , "db_resST" );
if ( !DEFINED( 'DB_VERM' ) OR DB_VERM == 0 ) {# Only send mail when not in debug mode
//mail( BUG_REPORT_EMAIL, "Error ". $code, "Error in $_SERVER[PHP_SELF]: " . $sqlerr );
dbPostOfficeST( $msg, "dBase Error Report" );
PrintErrST( $msg , "MemberPageDisplay");
}
if ( DB_VERM == 1 ) echo PrintErrST( $msg , "VERM");
EXIT();
}
if ( DEFINED('DB_VERM') AND DB_VERM == 2 ) {
$msg = error_messageST( $code, $query, "DB_VERM_QUERY = TRUE in header.inc.php" , "db_resST" );
echo PrintErrST( $msg , "VERM");
}
RETURN $res;
}