Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Errors with website...

Custom Title Activated
Loyal Member
Joined
Mar 26, 2012
Messages
1,465
Reaction score
130
Previous to using this new template my function for sqlsrv_query etc.. was working with no issues. Even the odbc_connect was just fine prior to this but, with this new site it is giving me an issue and I am unsure as to what the problem is. There are no logs, no errors other than the one showing it isn't writing to the database.
This is the code that is having the issue:
PHP:
 @odbc_exec($odbc_connect, '
                        INSERT INTO [' . $_CONFIG['db_databases']['web'] . '].[dbo].[VALIDATE] (
                            [key],
                            [type],
                            [account],
                            [timestamp],
                            [fieldAlfa],
                            [fieldBravo],
                            [fieldCharlie],
                            [fieldDelta],
                            [fieldEcho],
                            [fieldFoxtrot]
                        ) VALUES (
                            \'' . $key . '\',
                            0,
                            \''.$account.'\',
                            \''.time().'\',
                            \''.$email.'\',
                            \''.$md5pw.'\',
                            \''.md5($_CONFIG['security_secretAnswerSalt'].$geant).'\',
                            \''.date($_CONFIG['web_date_format']['date'], strtotime($birthday)).'\',
                            '.$gefra.',
                            \''.$_SERVER['REMOTE_ADDR'].'\'
                        )
                    '))
All values are correct and show when I echo the results. It just doesn't want to add them to the table in the database. This is using SQL Server 2012 Express, PHP version 5.4.45, IIS 7, Windows Server 2008. Any help here would be greatly appreciated. I have never dealt with an issue where it is just being stubborn enough to not input the variables.

Thank you.



Please disregard this. I rewrote the code and fixed it. Thank you.
PHP:
@odbc_exec($odbc_connect, "
                        INSERT INTO [" . $_CONFIG['db_databases']['web'] . "].[dbo].[VALIDATE] (
                            [key],
                            [type],
                            [account],
                            [timestamp],
                            [fieldAlfa],
                            [fieldBravo],
                            [fieldCharlie],
                            [fieldDelta],
                            [fieldEcho],
                            [fieldFoxtrot]
                        ) VALUES (
                           '".$key."',
                            '0',
                            '".$account."',
                            '".time()."',
                            '".$email."',
                            '".$md5pw."',
                            '".md5($_CONFIG['security_secretAnswerSalt'].$geant)."',
                            '". date($_CONFIG['web_date_format']['date'], strtotime($birthday))."',
                            '".$gefra."',
                            '". $_SERVER['REMOTE_ADDR'] . "'
                        )
                    ");
 
Back
Top