window.self.close();"; } } $query2="SELECT label,content,attribute,candidate FROM content WHERE pagenumber=$pagenumber"; $result2=mysql_query($query2); echo mysql_error(); $row2 = mysql_fetch_array($result2); //Commented these out...not sure if I need them for eval to work. If so, I will need to do name switch. $presC="Bill Mallory"; $presL="Ryan Conway"; $label=$row2[label]; $content=$row2[content]; $candidate=$row2[candidate]; $attribute=$row2[attribute]; //eval("\$label = \"$label\";"); //eval("\$content =\"$content\";"); ob_start(); eval("\$label = \"$label\";"); eval("\$content =\"$content\";"); ob_end_clean(); if (isset($_COOKIE[pagenumber])){ if ($_COOKIE[pagenumber]==$pagenumber){$transition=4;}//same candidate same attribute (intra candidate & intra attribute) else{ if ($_COOKIE[candidate]==$candidate){$transition=3;}//same candidate different attribute (intra candidate & inter attribute) else{ if ($_COOKIE[attribute]==$attribute){$transition=2;}//same attribute different candidate(inter candidate & intra attribute) else $transition=1; // (inter candidate & inter attribute) } } } else {$transition=0;} $query3= "UPDATE transition SET $userid='$transition' WHERE number = '$counter'"; $result3 = mysql_query($query3); setcookie("pagenumber", "$pagenumber", time()+3600*2); setcookie("candidate", "$candidate", time()+3600*2); setcookie("attribute", "$attribute", time()+3600*2); echo ""; ?>