Another update.
<?
require("../database.php");
$query = mysql_query("SELECT * FROM `form`");
$num_result = mysql_num_rows($query);
if ($num_result > 0){
$user_list = "
<div align=\"left\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"104\"><b>UserID:</b></td>
<td width=\"104\"><b>Username:</b></td>
<td width=\"104\"><b>Name:</b></td>
<td width=\"104\"><b>Job:</b></td>
<td width=\"104\"><b>Email:</b></td>
<td width=\"102\"><b>Joined Date:</b></td>
</tr>";
for ($i=0;$i<$num_result;$i++){
$phpvar = mysql_fetch_array($query);
$user_list .= "<tr><td>".$phpvar['userid']."</td><td>".$phpvar['user']."</td><td>".$phpvar['name']."</td><td>".$phpvar['job']."</td><td>".$phpvar['email']."</td><td>".$phpvar['datejoined']."</td></tr>";
}
$user_list .= "</table></div>";
echo $user_list;
echo("
<form action='?act=check' method='POST'>
<input type='radio' name='activate' value='none' checked>None <input type='radio' name='activate' value='accept'>Accept <input type='radio' name='activate'
value='decline' >Reject
<input type='Submit' value='Submit!'>
</form> ");
}
if($_GET['act'] == "check") {
$activate = $_POST['activate'];
if ($activate == "decline") {
mysql_query("DELETE FROM `form` WHERE userid = $usid") or die(mysql_error());
} if ($activate == "none") {
header('Location: http://www.unitedsyndicate.net/admin/wrong.html');
} else {
$user = mysql_query("SELECT user FROM `form` WHERE userid = $usid");
$pass = mysql_query("SELECT pass FROM `form` WHERE userid = $usid");
$name = mysql_query("SELECT name FROM `form` WHERE userid = $usid");
$date = mysql_query("SELECT datejoined FROM `form` WHERE userid = $usid");
$age = mysql_query("SELECT age FROM `form` WHERE userid = $usid");
$city = mysql_query("SELECT city FROM `form` WHERE userid = $usid");
$state = mysql_query("SELECT state FROM `form` WHERE userid = $usid");
$country = mysql_query("SELECT country FROM `form` WHERE userid = $usid");
$email = mysql_query("SELECT email FROM `form` WHERE userid = $usid");
$job = mysql_query("SELECT job FROM `form` WHERE userid = $usid");
$INSERT=mysql_query("INSERT INTO `users`(user,pass,name,userid,datejoined,age,city,state,country,email,job) VALUES
('$user','$pass','$name','','$date','$age','$city','$state','$country','$email','$job')")or die(mysql_error());
}
}
?>
I am almost there. How would I get $usid to be 1 or/and 2? And when I created a script thats shows the data in users that had been transfered from forms it shows this: Resource id #4
Resource id #4 Resource id #6 Resource id #13 Resource id #12 Resource id #7
Resource id #4 Resource id #6 Resource id #13 Resource id #12 Resource id #7
Also when I click accept and the form process is done, the second set of data is still the same. What I mean is the userid for the 2nd data is 2, and in the form processing the first one is deleted using the userid, I thought the userid = 2 would be updated to userid =1. I hope this helps... userid int(11) NOT NULL auto_increment, auto_increment = 1; And I got TYPE=MyISAM, I got a feeling that it is causing some problems with the data transfer.