<?php
include( "inc.php" );
if( !$_SESSION['en_code'] ) {
include( "login.php" );
die;
}
$wood = header( "Location: wood.php" );
$nowork = header( "Location: alinor.php" );
$mine = header( "Location: mine.php" );
if( $user['uWorkPlace'] == 'no' && $_POST['time'] ) {
if( $_POST['time'] >= 61 ) {
$_POST['time'] = '60';
}
mysql_query( "UPDATE users SET uWork='" . time() . "', uWorkPlace='" . $_POST['work'] . "', uTimeEnd=" . $_POST['time'] . " WHERE uID=$id");
}
if( $_POST['work'] == 'Добыча руды' ) {
$mine;
exit;
} elseif ( $_POST['work'] == 'Лесопилка' or $_POST['work'] == 'Охота')
{
$wood;
exit;
} else {
$nowork;
exit;
}
?>
Причём MySQL Запрос выполняет полностью.
А вот так вот отображает выполненый скрипт:
Notice: Undefined index: time in z:\home\new.ua\www\work.
php on line 10
Notice: Undefined index: work in z:\home\new.ua\www\work.
php on line 16
Notice: Undefined index: work in z:\home\new.ua\www\work.
php on line 19
Notice: Undefined index: work in z:\home\new.ua\www\work.
php on line 19