Hi all. After lots of research, I finally got this darn code to work. The only problem is I don't know how to detect which user is banned on the website and which user is not, or which user has a warning, and which 1 does not.
i want to detect which user is who by their ip. if say i banned that person, ONLY THAT PERSON would be banned.
Nobody else would be banned.
how would i do that?
a working example would be GREAT! 🙂
Code:
mysql_select_db($dbname, $con);
error_reporting(E_ALL);
ini_set('display_errors', 1);
$query = "SELECT $ip1, $warning1, $banned1, FROM $tbl;";
var_dump($query."<br>\n");
$result = mysql_query($query) or die(mysql_error());
//now lets go through every row returned.
while($row = mysql_fetch_assoc($result)){
$ip = $row[$ip1];
$warning = $row[$warning1];
$banned = $row[$banned1];
$rows = mysql_num_rows($result);
echo "query: ".$query."<br>\n";
echo "result: ".$result."<br>\n";
echo "row: ".$row."<br>\n";
echo "ip: ".$ip."<br>\n";
echo "warning: ".$warning."<br>\n";
echo "banned: ".$banned."<br>\n";
echo "rows: ".$rows."<br>\n";
if($warning > 0){
ANY help is GREATLY appreciated! 🙂