- Joined
- Aug 3, 2008
- Messages
- 172
- Reaction score
- 26
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:
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
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:
$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