PDA

View Full Version : Error Poll Checking DB for IPs Finding when there ant any


barkermn01
11-30-2007, 04:48 PM
Ok i have a poll Project i am building
download: http://yawe.co.uk/site/yawe.rar

The problem

function checkVote()
{
global $show;
$con = mysql_connect('localhost', 'yawe_site', 'r5kjp9lk');
mysql_select_db('yawe_Site', $con);
$ip = $_SERVER['REMOTE_ADDR'];
GETQ_ID();
$query = mysql_query("SELECT * FROM `Votes` WHERE `Q_ID`='".$q_id."'");
while($row = mysql_fetch_array($query))
{
if($row['IP'] == $ip){$show = FALSE;}else{$show = TRUE;}
echo $row['IP'];
}
mysql_close($con);
}

http://yawe.co.uk/site/

and yet output "Your IP has allredy voted for this poll"

Any help

The echo $row['IP']; is for me to see what IPs it finds that matchest and Yet dose not show any thing and yet there is a match i cant se where

Fumigator
11-30-2007, 06:27 PM
Can you be a bit more descriptive with what the problem is?