Faulty Voting System (Could not insert vote record)

Results 1 to 2 of 2
  1. #1
    Hardcore Member Z41N is offline
    MemberRank
    Aug 2008 Join Date
    132Posts

    Faulty Voting System (Could not insert vote record)

    Faulty Voting System (Could not insert vote record)
    Hi All,

    I'm using @greenelfx 's wonderful MB application.
    Everything works flawlessly, except for voting.

    Some users have reported no issues (of course, there is the issue of them receiving NX even if they don't proceed with actually voting on GTOP, but that's a pingback issue I have to tackle). HOWEVER, many users are receiving an error indicating "Could not insert vote record" and are unable to proceed to the redirect.

    This is the PHP code where the error occurs:
    PHP Code:
            $row $result->fetch_assoc();
            
    $sitequery $mysqli->query('SELECT * FROM '.$prefix."vote WHERE id = '".$siteid."'");
            
    $vsite $sitequery->fetch_assoc();
            
    $gvp $vsite['gvp'];
            
    $gnx $vsite['gnx'];
            
    $timecalc $time $row['date'];
            if (
    $row['amount'] == '' || $timecalc $vsite['waittime']) 
            {
                if (
    $row['amount'] == ''
                {
                    
    $result $mysqli->query('INSERT INTO '.$prefix."votingrecords (siteid, ip, account, date, times) VALUES ('".$siteid."', '".$ipaddress."', '".$account."', '".$time."', '1')") or die('Error - Could not insert vote records!');
                } 
                else 
                {
                    
    $result $mysqli->query('UPDATE '.$prefix."votingrecords SET siteid = '".$siteid."', ip='".$ipaddress."', account='".$account."', date='".$time."', times='1' WHERE account='".$account."' AND siteid = '".$siteid."'") or die('Error - Could not update vote records!');
                } 
    It's very odd because it doesn't happen to me, or a few others, but it does happen to others.
    I could just remove this piece, but then users could infinitely spam the submission and keep receiving NX, all whilst not even voting on GTOP.

    So in summary: vote does not redirect users to GTOP's website, due to the error of being unable to insert vote record (for some people) and I have no idea why at this point. Been at it for a few hours. Any help would be greatly appreciated.

    Thank you


  2. #2
    Hardcore Member Z41N is offline
    MemberRank
    Aug 2008 Join Date
    132Posts

    Re: Faulty Voting System (Could not insert vote record)

    Resolved! Was an issue with the timer



Advertisement