heheh sorry.
ok what my website does is schedule classes that are a week long on health. what i need is a way to denote which week has new people registered that we have not looked at yet. the girls in the office approve each new person coming to a class. they do that by going to a screen that lists all of the classes in a drop down and then sorting those results once they are in there. is there a way for me to make that drop down show which classes actually have new people in them without them having to go to each week and look? in case this helps here is the code i am using for the first screen.
PHP Code:
<?php
require('link.php');
// If search is active
if ($_POST['search']) {
$date = $_POST['date'];
$count = 0;
// Get results from database
$users = mysql_query("SELECT * FROM `form` WHERE Date = '$date' ORDER BY RegID DESC") or die ('Error Getting Users! \n<br />\n' .mysql_error());
$chk = mysql_num_rows($users);
// If no users found
if ($chk < 1) {
echo 'There are no users registered on the date: <b>'.$date.'</b>
<br />
<a href="bih.html"><<Back</a>';
}
// If there are users
else {
// Set header to download users
echo '
<a href="dateandprinted.php?date='.$date.'"><FONT SIZE="5" >Printed</FONT></a>
<a href="dateandnotprinted.php?date='.$date.'"><FONT SIZE="5" >Not Printed</FONT></a>
<a href="dateandapproved.php?date='.$date.'"><FONT SIZE="5" >Approved</FONT></a>
<a href="dateandnotapproved.php?date='.$date.'"><FONT SIZE="5" >Not Approved</FONT></a>
<hr align="Center" size="1">
<br>
People attending '.$date.'<br><br>
<table border="1">
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td>FName </td>
<td>LName </td>
<td>EMail </td>
<td width="150">Phone </td>
<td>Address </td>
<td>City </td>
<td>State</td>
<td>Zip</td>
<td>OState </td>
<td>Country </td>
<td>DOB</td>
<td>Occ </td>
<td>Meds </td>
<td>Married</td>
<td>Accomidation </td>
</tr>';
// Show data for each user
while($u = mysql_fetch_array($users)) {
echo '
<tr>
<td><a href="edit2.php?RegID='.$u['RegID'].'">Update</a></td>
<td><a href="view.php?RegID='.$u['RegID'].'">View</a></td>
<td><a href="print.php?RegID='.$u['RegID'].'">Print</a></td>
<td>'.$u['FName'].'</td>
<td>'.$u['LName'].'</td>
<td>'.$u['EMail'].'</td>
<td>'.$u['Phone'].'</td>
<td>'.$u['Address'].'</td>
<td>'.$u['City'].'</td>
<td>'.$u['State'].'</td>
<td>'.$u['Zip'].'</td>
<td>'.$u['OState'].'</td>
<td>'.$u['Country'].'</td>
<td>'.$u['DOB'].'</td>
<td>'.$u['Occ'].'</td>
<td>'.$u['Meds'].'</td>
<td>'.$u['Married'].'</td>
<td>'.$u['Accom'].'</td>
</tr>';
$count++;
}
echo '</table> <br><br>Number Of Attendees is '.$count.'<br><br><a href="bih.html">Back</a>';
}
// End table
}
// download on click
if (!$_POST['search']) {
echo ' <center><h2>Download Program Signups.</h2></center><br><br>
<form method="post" action="">
<b>Date:</b> <select name="date" size="1">
<option selected value="">Program...</option>
<option value="For My Life 04/22/07 - 04/28/07">For My Life 04/22/07 - 04/28/07</option>
<option value="For My Life 04/29/07 - 05/05/07">For My Life 04/29/07 - 05/05/07</option>
<option value="For My Life 05/13/07 - 05/19/07">For My Life 05/13/07 - 05/19/07</option>
<option value="For My Life 05/20/07 - 05/26/07">For My Life 05/20/07 - 05/26/07</option>
<option value="For Their Life 05/20/07 - 05/26/07">For Their Life 05/20/07 - 05/26/07</option>
<option value="For My Life 06/03/07 - 06/09/07">For My Life 06/03/07 - 06/09/07</option>
<option value="For My Life Childrens 06/03/07 - 06/09/07">For My Life Childrens 06/03/07 - 06/09/07</option>
<option value="For My Life 06/10/07 - 06/16/07">For My Life 06/10/07 - 06/16/07</option>
<option value="For Their Life 06/10/07 - 06/16/07">For Their Life 06/10/07 - 06/16/07</option>
<option value="For My Life 06/24/07 - 06/30/07">For My Life 06/24/07 - 06/30/07</option>
<option value="For My Life 07/08/07 - 07/14/07">For My Life 07/08/07 - 07/14/07</option>
<option value="For Their Life 07/08/07 - 07/14/07">For Their Life 07/08/07 - 07/14/07</option>
<option value="For My Life 07/22/07 - 07/28/07">For My Life 07/22/07 - 07/28/07</option>
<option value="For My Life 07/29/07 - 08/4/07">For My Life 07/29/07 - 08/4/07</option>
<option value="For Their Life 07/29/07 - 08/4/07">For Their Life 07/29/07 - 08/4/07</option>
<option value="For My Life 08/12/07 - 08/18/07">For My Life 08/12/07 - 08/18/07</option>
<option value="For My Life Childrens 08/12/07 - 08/18/07">For My Life Childrens 08/12/07 - 08/18/07</option>
<option value="For My Life 08/19/07 - 08/25/07">For My Life 08/19/07 - 08/25/07</option>
<option value="For Their Life 08/19/07 - 08/25/07">For Their Life 08/19/07 - 08/25/07</option>
<option value="For My Life 09/02/07 - 09/08/07">For My Life 09/02/07 - 09/08/07</option>
<option value="For My Life 09/09/07 - 09/15/07">For My Life 09/09/07 - 09/15/07</option>
<option value="For Their Life 09/09/07 - 09/15/07">For Their Life 09/09/07 - 09/15/07</option>
<option value="For My Life 09/23/07 - 09/29/07">For My Life 09/23/07 - 09/29/07</option>
<option value="For My Life 09/30/07 - 10/06/07">For My Life 09/30/07 - 10/06/07</option>
<option value="For My Life 10/14/07 - 10/20/07">For My Life 10/14/07 - 10/20/07</option>
<option value="For My Life Childrens 10/14/07 - 10/20/07">For My Life Childrens 10/14/07 - 10/20/07</option>
<option value="For My Life 10/21/07 - 10/27/07">For My Life 10/21/07 - 10/27/07</option>
<option value="For Their Life 10/21/07 - 10/27/07">For Their Life 10/21/07 - 10/27/07</option>
<option value="For My Life 11/04/07 - 11/10/07">For My Life 11/04/07 - 11/10/07</option>
<option value="For My Life 11/11/07 - 11/17/07">For My Life 11/11/07 - 11/17/07</option>
<option value="For Their Life 11/11/07 - 11/17/07">For Their Life 11/11/07 - 11/17/07</option>
<option value="For My Life 11/25/07 - 12/01/07">For My Life 11/25/07 - 12/01/07</option>
<option value="For My Life 12/02/07 - 12/08/07">For My Life 12/02/07 - 12/08/07</option>
<option value="For Their Life 12/02/07 - 12/08/07">For Their Life 12/02/07 - 12/08/07</option>
<option value="For My Life 12/09/07 - 12/15/07">For My Life 12/09/07 - 12/15/07</option>
</select>
<input type="submit" name="search" value="Search" />
</form><br><br><br><a href="bih.html"><<Back</a>';
}
?>
as you can see there is no way to tell if a person has been approved other than going to each week and sorting. by the way my sort is a field that each user has assigned at signup. i set it to 0 by default meaning he is not approved. to approve them i run this little bit of code on that person setting them to 1 in that field so i can defrentiate
PHP Code:
<?php
require('link.php');
// Get the user id
$RegID = $_GET['RegID'];
// Get data from user with the specified id
$info = mysql_query("SELECT * FROM `form` WHERE RegID = '$RegID'") or die ('Error Getting User Data! <br />' .mysql_error());
$chk = mysql_num_rows($info);
$u = mysql_fetch_array($info);
$dateout = $u['Date'];
// If edit not hit
if (!$_POST['edit']) {
// If user id returns no results
if ($chk < 1) {
echo 'The user with the id <b>'.$u['RegID'].'</b> does not exist!';
}
else {
// Edit Form
echo'
<a href="edit2.php?RegID='.$u['RegID'].'"><FONT SIZE="5" >Update</a>
<a href="delete.php?act=chk_del&RegID='.$u['RegID'].'">Delete</a>
<a href="print.php?RegID='.$u['RegID'].'">Print</a>
<a href="view.php?RegID='.$u['RegID'].'">View</a>
<a href="approve.php?RegID='.$u['RegID'].'">Approve</a>
<a href="bih.html">Back To Main</FONT></a><br><hr align="Center" size="1"><br>
';
$update = mysql_query("UPDATE `form` SET Approved = '1' WHERE RegID = '$RegID'") or die ('Error Updating Data! <br />' .mysql_error());
echo 'User Approved!';
}
}
?>
hope this clarifies. all i want to do is have a way to possible change the background color or text color in the date dropdown that the administrative users choose from so that they can see at a glance which weeks have new signups they have not looked at yet.
thanks for you thoughts.
Bookmarks