I'm trying to bring a old script that was encrypted and shut down back to life but i'm not the best at php but practice makes prefect.
I've just decoded it and going though the installation process and i'm getting PHP Notices Undefined variable.
[21-Sep-2013 17:51:56 Europe/Berlin] PHP Notice: Undefined variable: dberror in C:\xampp\htdocs\install\step1.php on line 7
[21-Sep-2013 17:51:56 Europe/Berlin] PHP Notice: Undefined variable: dberror in C:\xampp\htdocs\install\step1.php on line 10
<?php
if (isset($setdb)) {
if (( ( ( $dbhost && $dbuser ) && $dbpass ) && $dbname )) {
( @mysql_connect( $dbhost, $dbuser, $dbpass ) || $dberror = 'Can\'t connect to database server' );
if (!$dberror) {
( @mysql_select_db( $dbname ) || $dberror = 'Can\'t select database' );
if (!$dberror) {
@session_register( 'dbhost' );
@session_register( 'dbuser' );
@session_register( 'dbpass' );
@session_register( 'dbname' );
$_SESSION['dbhost'] = $dbhost;
$_SESSION['dbuser'] = $dbuser;
$_SESSION['dbpass'] = $dbpass;
$_SESSION['dbname'] = $dbname;
print '<script> window.location=\'index.php?menu=step2\'; </script>';
}
}
}
else {
$dberror = 'All fields are required';
}
}
Could someone tell me what is wrong please.