Появилась проблема , помогите ))
if ( isset( $_POST['action'] ) && $_POST['action'] == 'withdraw' ) {
$withdraw_comm = $_POST['amount']*(0.5/100);
$withdraw_summ = ( $_POST['amount'] + $withdraw_comm );
$user_bal_sql = $db->query( 'SELECT `incoming_balance` FROM `dle_users` WHERE user_id = '. $member_id['user_id'] );
$user_bal_row = $db->get_row($user_bal_sql);
if ( $user_bal_row['incoming_balance'] < $withdraw_summ ) {
echo "<script>alert('Недостаточно средств!');</script>";
echo "<script>window.location.href = '/rus/personal/';</script>";
} else {
$withdraw_sql = $db->query( 'INSERT INTO `dle_withdraw_request` (`user_id`, `user_login`, `wallet`, `amount`, `commission`, `summ`, `date`) VALUES ('. $member_id['user_id']. ', "'. $member_id['name'] .'", "'. $member_id['sm_wallet'] .'", ' . $_POST['amount'] .', '. $withdraw_comm .', '. $withdraw_summ .', "' .date("Y-m-d H:i:s"). '")' );
$update_bal_sql = $db->query( 'UPDATE `dle_users` SET `incoming_balance` = '. ( $user_bal_row['incoming_balance'] - $withdraw_summ ) .' WHERE `user_id` = '. $member_id['user_id'] );
$history_sql = $db->query("INSERT INTO `dle_users_history` (`user_id`, `date`, `true_date`, `transaction_type`, `inbox`, `outbox`, `balance`) VALUES (". $member_id['user_id'] .", ". date("jmY") .", '". date("Y-m-d"). "', ". 2 .", ". 0 .", ". $_POST['amount'] .", ". ( $user_bal_row['incoming_balance'] - $withdraw_summ ) .")");
echo "<script>alert('Заявка на выплату отправлена в обработку!');</script>";
echo "<script>window.location.href = '/rus/personal/';</script>";
}
}
вот проблемная строка
$withdraw_sql = $db->query( 'INSERT INTO `dle_withdraw_request` (`user_id`, `user_login`, `wallet`, `amount`, `commission`, `summ`, `date`) VALUES ('. $member_id['user_id']. ', "'. $member_id['name'] .'", "'. $member_id['sm_wallet'] .'", ' . $_POST['amount'] .', '. $withdraw_comm .', '. $withdraw_summ .', "' .date("Y-m-d H:i:s"). '")' );
вот ошибка
Help me !