Hello, I have been beating my head over this issue for almost a week now. I have my pages setup to where the user can register and I can display these members.
Here is where it gets fun. Where the applicants are display they are in the rows so that admins can view them all as we manually need to accept each member. Each row has an approve or deny button. When approved is pressed it takes you to a page where you can review and see 3 choices they made and select 1 of them for what training path they go on, update their permissions give them their password and userID as well as move this info to another table. On the other button it simply allows admins to either delete or ban.
I could use some help on how to do this. I have the pages laid out but cannot pass the displayed data from pending apps to their appropriate approve or deny pages. Thanks in advance for any help. Below is what I have to display and it works just fine. Just adding in I need to add code to this.
<?php require_once('../Connections/DB'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_rougueDB, $rougueDB);
$query_Apps = "SELECT Name, Age, email, VID, version, choice1, choice2, home, choice3, resume, Applicant FROM table WHERE Applicant = 'y'";
$Apps = mysql_query($query_Apps, $DB) or die(mysql_error());
$row_Apps = mysql_fetch_assoc($Apps);
$totalRows_Apps = mysql_num_rows($Apps);
?>
<table border="2">
<tr>
<td>Name</td>
<td>Age</td>
<td>email</td>
<td>VID</td>
<td>Version</td>
<td> Selection 1</td>
<td> Selection 2</td>
<td> Selection 3</td>
<td>Location</td>
<td>resume</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Apps['Name']; ?></td>
<td><?php echo $row_Apps['Age']; ?></td>
<td><?php echo $row_Apps['email']; ?></td>
<td><?php echo $row_Apps['VID']; ?></td>
<td><?php echo $row_Apps['version']; ?></td>
<td><?php echo $row_Apps['choice1']; ?></td>
<td><?php echo $row_Apps['choice2']; ?></td>
<td><?php echo $row_Apps['choice3']; ?></td>
<td><?php echo $row_Apps['home']; ?></td>
<td><?php echo $row_Apps['resume']; ?></td>
<form action="approved.php" method="post"> <td><input type="submit" value="Approve" </td></form>
<form action="denial.php" method="post"><td><input type="submit" value="Deny" </td></form>
</tr>
<?php } while ($row_Apps = mysql_fetch_assoc($Apps)); ?>
</table>
<?php
mysql_free_result($Apps);
?></p>
</div>
</div>
</div>