Hi,
This code:
That's the whole file. Why does it insert...
1. A row of the Md5'ed $main variable, like it's supposed to, but then...
2. Another row which has the SAME value for $main EACH TIME I run this script... very odd.
Here are the rows it inserts after I run the script only 2 times:
b2fcb4ba898f479790076dbd5daa133f
d41d8cd98f00b204e9800998ecf8427e
84d72f977c4770ee176911e3165257d1
d41d8cd98f00b204e9800998ecf8427e
As you can see, the second and fourth rows are the same...
This code:
PHP:
<?php
include("../fns.php");
if (!$act || !$id)
{
error("Could not find action and/or ID.");
}
$q = mysql_query("SELECT * FROM registry WHERE id='$id' LIMIT 1");
while ($r = mysql_fetch_array($q))
{
$name = $r['name'];
$uid = $r['uid'];
}
$name = strtolower($name);
$name2 = explode(".", $name);
$main = $name2[0];
$main = md5($main);
$datea = date("F d, Y");
if ($act == "bd")
{
mysql_query("DELETE FROM registry WHERE id='$id' LIMIT 1");
mysql_query("INSERT INTO banned VALUES(NULL, '$main', '$datea')");
//Done.
}
if ($act == "b")
{
mysql_query("INSERT INTO banned VALUES(NULL, '$main', '$datea')");
//Done.
}
if ($act == "d")
{
mysql_query("DELETE FROM registry WHERE id='$id' LIMIT 1");
//Done.
}
?>
That's the whole file. Why does it insert...
1. A row of the Md5'ed $main variable, like it's supposed to, but then...
2. Another row which has the SAME value for $main EACH TIME I run this script... very odd.
Here are the rows it inserts after I run the script only 2 times:
b2fcb4ba898f479790076dbd5daa133f
d41d8cd98f00b204e9800998ecf8427e
84d72f977c4770ee176911e3165257d1
d41d8cd98f00b204e9800998ecf8427e
As you can see, the second and fourth rows are the same...






