Nieuw lid |
|
Beste,
ik heb een rating script,
wat goed werkte tot vandaag.
Gister werkte alles nog perfect en vandaag kreeg ik ineens deze fout mee:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/flavour/domains/partyflavour.nl/public_html/vote/addrating.php
on line 25
Dit is de addrating.php
<?php
include "auth/config.php";
include('../boven.php');
$ser=$_SERVER['HTTP_HOST'];
$ref=$_SERVER['HTTP_REFERER'];
$host= parse_url($ref);
//print_r($host);
$rateval = $_POST['rating'];
$url = $_POST['url'];
$ipadd = $_POST['ip'];
$dat = date('y-m-d');
//echo "Stemmen : $rateval,$url,$ipadd";
$link = mysql_connect($hostname, $username,$password);
if($link)
{
$dbcon = mysql_select_db($dbname,$link);
}
$res = mysql_query("select url from hsrs where ip='$ipadd' && url='$url'");
$dd = mysql_fetch_array($res,MYSQL_BOTH);
$val = $dd[0];
echo "<center><table><tr><td>";
if(!$val && $ser == $host[host])
{
echo"<center><img src=\"../vote/images/bedankt.png\"></center>";
$result = mysql_query("insert into hsrs values(NULL,'$ipadd','$url','$dat','$rateval')",$link);
}
else
{
echo "<center><img src=\"../vote/images/error.png\"></center>";
}
echo "<br><br><a style=\"background-color:#transparant; text-decoration:none; cursor:pointer; border:0px solid red;\" href=\"$url\"><center>Terug</center></a></td></tr></table></center>";
?>
<?php
include('../onder.php');
?>
<?php include "auth/config.php"; include('../boven.php'); $ser=$_SERVER['HTTP_HOST']; $ref=$_SERVER['HTTP_REFERER']; //print_r($host); $rateval = $_POST['rating']; $url = $_POST['url']; $ipadd = $_POST['ip']; //echo "Stemmen : $rateval,$url,$ipadd"; if($link) { } $res = mysql_query("select url from hsrs where ip='$ipadd' && url='$url'"); $val = $dd[0]; echo "<center><table><tr><td>"; if(!$val && $ser == $host[host]) { echo"<center><img src=\"../vote/images/bedankt.png\"></center>"; $result = mysql_query("insert into hsrs values(NULL,'$ipadd','$url','$dat','$rateval')",$link); } else { echo "<center><img src=\"../vote/images/error.png\"></center>"; } echo "<br><br><a style=\"background-color:#transparant; text-decoration:none; cursor:pointer; border:0px solid red;\" href=\"$url\"><center>Terug</center></a></td></tr></table></center>"; ?> <?php include('../onder.php'); ?>
heeft er iemand misschien een idee ?
|