elseif(isset($_POST[\'delete\']))
{
mysql_query("DELETE FROM clients WHERE name=\'$num\'") or $error=true;
if(isset($error))
{
echo \'HRMMMM It\'s broken.<br><small>\' . mysql_error() . \'</small><br>\';
echo \'Click <a href="\' . $PHP_SELF . \'">HERE</a> to try again.\';
}
else
{
echo \'This client has now been deleted. Let them try to find a better host!\';
}
}
echo \'<form name="clientForm" action="\' . $PHP_SELF . \'" method="POST"><font color ="336699" size="1" Font="Arial"><font face="Arial">\';
?>
<select name="selector" onchange="showIt()" size="1">
<option selected value="">-- Select A Client --</option>
<?php
$temp = \'<option value="\' . $num . \'">%n</option>\';
$max = mysql_fetch_array(mysql_query(\'SELECT MAX(id) FROM clients\'));
$max = $max[\'MAX(id)\']+1;
while($result = mysql_fetch_array(mysql_query(\'SELECT * FROM clients WHERE id<\' . $max . \' ORDER BY id DESC;\')))
{
$n = $_POST[\'name\'];
$e = $_POST[\'email\'];
$a = $_POST[\'aim\'];
$i = $_POST[\'icq\'];
$s = $_POST[\'site\'];
$l = date(\'F j Y\');
$num=$_POST[\'id\'];
echo str_replace(Array(\'%n\', \'%e\', \'%a\', \'%i\', \'%s\', \'%l\'), Array($result[\'name\'], $result[\'email\'], $result[\'aim\'], $result[\'icq\'], $result[\'site\'], $result[\'listed\']), $temp);
$max = $result[\'id\'];
}
?>
</select>
I get the statement: This client has now been deleted. Let them try to find a better host! So it doesn\'t have an error, and thinks that it deletes it, but it doesn\'t.