<?php
$ip = htmlspecialchars($_GET["ip"]);
$serverIp = "a";
$a = "a";
include("mysql.php");
$votes = "serverVotes";
$results = mysql_query("SELECT * FROM toplist WHERE serverIp = $_POST[serverIp] ORDER BY $votes DESC");
if($row['serverIp'] = $_POST[serverIp]) {
echo 'Yes1.'; //debugging
}
if($row['serverIp'] != $_POST[serverIp]) {
echo 'No1.'; //debugging
}
while($row = mysql_fetch_array($results)){
if($row['serverIp'] = $_POST[serverIp]) {
echo 'Yes2.'; //debugging
}
if($row['serverIp'] != $_POST[serverIp]) {
echo 'No2.'; //debugging
}
}
?>
I’m trying to make it, so that if “serverIp” exists in the database, it will echo certain information, and if it doesn’t exists, it will just do nothing. I don’t think it is
actually getting the IP from the form, but I may be wrong, it may be some other problem.
have you tried this?