Ok this is what I have so far.
<?
require('../database.php');
$query = mysql_query("SELECT * FROM `form`");
$num_result = mysql_num_rows($query);
if ($num_result > 0){
$rowcount = 1;
print "There are $num_result people waiting for evaluation:<BR /><BR />";
while ($row = mysql_fetch_assoc($query)) {
print "Row $rowcount<BR />";
echo("
<form action='process.php' act=check' method='POST'>
<input type='radio' name='activate' value='0' checked>None <input type='radio' name='activate' value='1'>Accept <input type='radio' name='activate'
value='2' >Reject
<input type='Submit' value='Submit!'>
</form> ");
while(list($var, $val) = each($row)) {
print "<B>$var</B>: $val<BR />";
}
print "<BR />";
++$rowcount;
}
}
?>
Here is what it looks like:click here
And the only thing so far I have for the process.php is this.
<?
INCLUDE('../database.php');
if($_GET['act'] == "check") {
$activate = $_POST['activate'];
if ($activate == "2") {
mysql_query("DELETE FROM `form`") or die(mysql_error());
} if ($activate == "0") {
header('Location: http://www.unitedsyndicate.net/admin/wrong.php');
} else {
mysql_query("INSERT INTO `users` (user,pass,name,userid,datejoined,age,city,state,country,email,job)
SELECT user,pass,name,userid,datejoined,age,city,state,country,email,job FROM `form`") or die(mysql_error());
mysql_query("DELETE FROM `form' ") or die(mysql_error());
}
}
?>
How would I change the code to make it where the activate is equal to 2, then the first row would be deleted. And when it is equal to 1 then the first row would be copied to another table and be deleted from the previous table?