ok, this is what i have
what im wanting to do, is have it sort by location, i have 3 locations, and want it to be able to show just 1 of the 3, or all of the 3. (Bakersfield, Sahara, Lake Mead)
heres the code that pulls it up..
<?php
include "config.inc.php";
?>
<html>
<head>
<title><?php echo $pagetitle ?> </title>
<link rel="stylesheet" href="../style.css" type="text/css">
<body background="../images/bgrnd.gif" bgcolor="#FFFFFF" text="#000000" link="#000066" vlink="#3366CC" topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<?php
//Start PHP List Maker
//check editor user
if ($create) {
///////////////////
//create the file//
///////////////////
$textfilename .= "emaillist.txt";
$fp = fopen("../filez/$textfilename", "w");
////////////////////////////////////////
//read the content out of the database//
////////////////////////////////////////
$result = mysql_db_query ("$dbname","select * from $dbTable WHERE email LIKE '%@%' AND send = '1' ORDER BY email DESC");
$numRows=mysql_num_rows($result);
if ($numRows > 0) fwrite ($fp,"Name,E-mail Address\n");
while ($row = mysql_fetch_array ($result))
{
// $UID =$row[UID];
//true csv has quotes and commas
//$message = "\"{$row['fname']} {$row['name']}\",\"{$row['email']}\"\n";
$message = "{$row['fname']} {$row['name']},{$row['email']}\n";
///////////////////////////////////////////////
//write the content strings into the textfile//
///////////////////////////////////////////////
fwrite ($fp,$message);
} //while
fclose ($fp);
chmod ("../filez/$textfilename", 0777);
mysql_free_result($result);
}
//End PHP List Maker
?>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="140">
<tr>
<td height="78"><img border="0" src="../images/logo1.gif" width="166" height="78"><img border="0" src="../images/logo2.gif" width="212" height="78"><img border="0" src="../images/tag1.jpg" width="414" height="78"></td>
</tr>
<tr>
<td background="../images/topbar.gif" bgcolor="#BBC8E6" height="18">
<img border="0" src="../images/topbar1.gif" width="378" height="21"><img border="0" src="../images/topbar2.gif" width="414" height="21"></td>
</tr>
<TR>
<TD height="19"><br><br>
<div align="center">
<table border="1" cellspacing="0" cellpadding="4" bordercolor="#000000">
<tr>
<td width="155" class="titel" align="center"><b><a href="index.php">Show Members</a></b></td>
<td width="155" class="titel" align="center"><b><a href="index.php?create=1">Create List</a></b></td>
</tr>
</table>
<?php
////////////////////////
//if everything ist ok//
////////////////////////
if (($create) && (file_exists("../filez/$textfilename")))
{
echo "File created successfully - wrote $NumberOfFields email-addresses ---- ";
echo "<a href=\"../filez/$textfilename\" target=\"_blank\" style=\"color: red;\">Show Textfile</a><br><br>\n";
}
else if (($create) && (!file_exists("../filez/$textfilename")))
{
echo "<b>There were problems creating the file.</b><a href=\"mailto:$admin_mail\" style=\"color: red;\">mail to: $admin_mail</a>\n";
}
?>
<?php
include "config.inc.php";
?>
<?php
?>
<form name="form1" method="get" action="<?php echo $PHP_SELF ?>">
<table border="1" cellspacing="2" cellpadding="2" bordercolor="#000000">
<tr>
<td class="titel"><b>Nb</b></td>
<td width="155" class="titel"><b>First Name</b></td>
<td width="155" class="titel"><b>Last Name</b></td>
<td width="155" class="titel"><b>Location</b></td>
<td width="100" class="titel"><b>Date</b></td>
<td width="210" class="titel"><b>E-Mail</b></td>
<td class="titel"><b>Delete</b></td>
</tr>
<?php
///////////////////////////////
//delete the selected entries//
///////////////////////////////
if ($submit) {
$i = 0;
$anz_array = count($delbox); //all arrays
while ($i < $anz_array) {
$delete = mysql_db_query ("$dbname","delete from $dbTable where id=$delbox[$i]");
$result = mysql_query($delete);
$i++;
}
}
//////////////////////////////
//select all correct entries//
//////////////////////////////
$j = 1;
$result = mysql_db_query ("$dbname","select * from $dbTable WHERE email LIKE '%@%' AND email LIKE '%.%' AND send='1' ORDER BY ID");
while ($row = mysql_fetch_array ($result))
{
$email_orig =$row["email"];
$name =$row["name"];
$fname =$row[fname];
$UID =$row[UID];
$id_orig =$row[id];
$date =$row[Date];
$location =$row[location];
echo"<tr>\n";
echo"<td class=\"tx\">$j</td>\n";
echo"<td class=\"tx\" width=\"155\">$fname</td>\n";
echo"<td class=\"tx\" width=\"155\">$name</td>\n";
echo"<td class=\"tx\" width=\"100\">$location</td>\n";
echo"<td class=\"tx\" width=\"100\">$date</td>\n";
echo"<td class=\"tx\" width=\"210\"><a href=\"mailto:$email_orig\">$email_orig</a></td>\n";
echo"<td class=\"tx\"><input type=\"checkbox\" name=\"delbox[]\" value=\"$id_orig\"></td>\n";
echo"</tr>\n";
$j++;
}
?>
<tr>
<td> </td>
<td width="155"> </td>
<td width="155"> </td>
<td width="100"> </td>
<td width="100"> </td>
<td width="210"> </td>
<td> </td>
</tr>
<?php
////////////////////////////////
//select all incorrect entries//
////////////////////////////////
$c = 1;
$result2 = mysql_db_query ("$dbname","select * from $dbTable WHERE email NOT LIKE '%@%' OR email NOT LIKE '%.%' ORDER BY email");
while ($row = mysql_fetch_array ($result2))
{
$email_orig =$row["email"];
$name =$row["name"];
$fname =$row[fname];
$date =$row[Date];
$location =$row[location];
$UID =$row[uid];
$id_orig =$row[id];
echo"<tr>\n";
echo"<td> </td>\n";
echo"<td width=\"155\"> </td>\n";
echo"<td width=\"155\"> </td>\n";
echo"<td width=\"100\"> </td>\n";
echo"<td width=\"100\"> </td>\n";
echo"<td width=\"210\" class=\"titel\">you can delete these:</td>\n";
echo"<td> </td>\n";
echo"</tr>\n";
echo"<tr>\n";
echo"<td class=\"tx\">$c</td>\n";
echo"<td class=\"tx\" width=\"155\">$fname</td>\n";
echo"<td class=\"tx\" width=\"155\">$name</td>\n";
echo"<td class=\"tx\" width=\"155\">$location</td>\n";
echo"<td class=\"tx\" width=\"100\">$date</td>\n";
echo"<td class=\"tx\" width=\"210\">$email_orig</td>\n";
echo"<td class=\"tx\"><input type=\"checkbox\" name=\"delbox[]\" value=\"$id_orig\"></td>\n";
echo"</tr>\n";
$c++;
}
?>
<tr>
<td> </td>
<td width="155"> </td>
<td width="155"> </td>
<td width="100"> </td>
<td width="210"> </td>
<td>
<input type="submit" name="submit" value="submit"></td>
</tr>
</table>
</form>
</div><br><br></TD></TR>
<TR>
<TD background=../images/btmbar.gif bgColor=#bbc8e6 height="25">
<IMG height=21 src="../images/btmbar.gif" width=1 border=0>
</TD>
</TR>
</TABLE>
</BODY></HTML>
heres the links!
http://www.clanknm.com/compren
http://www.clanknm.com/compren/admin