Hello
i have a candidate application form that once submitted is diplayed in a new candidate page, currently newest first, however i dont want new candidates to be displayed until they have been reviewed. Once it has been reviewed in want a radio button on the backend to say allow record to be shown.
i think this would be done with a toggle but dont know where to start
any ideas?
thanks
yes, sorry been too focused and forgot my manners....
using my SQL php
and here is the script for the backend adminsitration of the candidate
<?
session_start();
if(!$_SESSION['loggedIn']) // If the user IS NOT logged in, forward them back to the login page
{
header("location:Login.html");
}
?>
<?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;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form2")) {
$updateSQL = sprintf("UPDATE think_signup SET userid=%s, FirstName=%s, Surname=%s, password=%s, email=%s, ContactMethod=%s, TeleNumber=%s, SalaryReq=%s, PositionReq=%s, skills_offered=%s, needCV=%s, otherComments=%s, location=%s, CanInfo=%s, CanAdminInfo=%s, CandidateSkills=%s WHERE ID=%s",
GetSQLValueString($_POST['userid'], "text"),
GetSQLValueString($_POST['FirstName'], "text"),
GetSQLValueString($_POST['Surname'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['ContactMethod'], "text"),
GetSQLValueString($_POST['TeleNumber'], "text"),
GetSQLValueString($_POST['SalaryReq'], "text"),
GetSQLValueString($_POST['PositionReq'], "text"),
GetSQLValueString($_POST['skills_offered'], "text"),
GetSQLValueString($_POST['needCV'], "text"),
GetSQLValueString($_POST['otherComments'], "text"),
GetSQLValueString($_POST['location'], "text"),
GetSQLValueString($_POST['CanInfo'], "text"),
GetSQLValueString($_POST['CanAdminInfo'], "text"),
GetSQLValueString($_POST['CandidateSkills'], "text"),
GetSQLValueString($_POST['ID'], "int"));
mysql_select_db($database_hostprop, $hostprop);
$Result1 = mysql_query($updateSQL, $hostprop) or die(mysql_error());
$updateGoTo = "candidate-list.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['ID'])) {
$colname_Recordset1 = $_GET['ID'];
}
mysql_select_db($database_hostprop, $hostprop);
$query_Recordset1 = sprintf("SELECT * FROM think_signup WHERE ID = %s", GetSQLValueString($colname_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $hostprop) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
and an example of the form with some of the editable feilds
<form action="<?php echo $editFormAction; ?>" method="post" name="form2" id="form2">
<input type="text" name="userid" value="<?php echo htmlentities($row_Recordset1['userid'], ENT_COMPAT, 'ISO-8859-1'); ?>" size="32" />
<input type="text" name="FirstName" value="<?php echo htmlentities($row_Recordset1['FirstName'], ENT_COMPAT, 'ISO-8859-1'); ?>" size="32" />
<input type="text" name="Surname" value="<?php echo htmlentities($row_Recordset1['Surname'], ENT_COMPAT, 'ISO-8859-1'); ?>" size="32" />
<input type="text" name="password" value="<?php echo htmlentities($row_Recordset1['password'], ENT_COMPAT, 'ISO-8859-1'); ?>" size="32" />
<input type="hidden" name="MM_update" value="form2" />
<input type="hidden" name="ID" value="<?php echo $row_Recordset1['ID']; ?>" />
</form>
so i need a check box in here ( and i can add a feild to the DB called auth) that once click will then display the information in another page
thanks
North America
Europe, Middle East and Africa
Asia Pacific