Jump to content
MakeWebGames

Slight Issue


The Ace

Recommended Posts

People can't seem to vote when they use the "Opera" browser. It works fine with IE and FireFox, but when someone tries to vote, it takes them to the login screen rather than the actual voting site, where they click yes or no or whatnot...

Any ideas why? :?

Link to comment
Share on other sites

Re: Slight Issue

Opera seems to use a very different way of networking than most browsers, and it has these little "mishaps".

The session is getting deleted on page load, but this shouldn't happen, it's a bug in your program, not the Opera browser.

Mind posting the contents of that script here?

Link to comment
Share on other sites

Re: Slight Issue

OK, I'll post one of the votecetop.php (for example) :lol:

Here is my votecetop.php

 

<?php
session_start();
if(get_magic_quotes_gpc() == 0)
{
foreach($_POST as $k => $v)
{
 $_POST[$k]=addslashes($v);
}
foreach($_GET as $k => $v)
{
 $_GET[$k]=addslashes($v);
}
}
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
include "config.php";
global $_CONFIG;
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid");
$ir=$db->fetch_row($is);
$q=$db->query("SELECT * FROM votes WHERE userid=$userid AND list='cetop'");
if($db->num_rows($q))
{

print "You have already voted at CE Top Web Games today!";

}
else
{
$db->query("INSERT INTO votes values ($userid,'cetop')");
$db->query("UPDATE users SET crystals=crystals+45 WHERE userid=$userid");
header("Location:http://www.cetopwebgames.com/index.php?in=1688");
exit;
}
?>

 

If you need the others, I will post them.... :)

Link to comment
Share on other sites

  • 2 weeks later...

Re: Slight Issue

Perhaps the problem is the www subdomain.

If they were on the top level domain (i.e., no www in the url) and then are redirected to www, that would cause the problem.

The best way to prevent such a thing, is to use relative links and if you do use full links, always have it either with the www, or without. If you have it one way in one place, and another way in another place, that will cause problems.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...