hello
i need help to slove this:
i have a database )table name is users)
the structre of the table is:
ID username approved(1= approved 0=notapproved)
i have done the signup script, but i want to write a script to approve the new members.
what i did so far is this:
<?
include "config.php";
$DB = mysql_connect("$checkservername", "$dbcheckusername", "$dbcheckpassword");
mysql_select_db("$dbcheckbase", $DB);
////////////////////////////////////////////////////////////////////////////////////////
if (!$update):
echo "<html>\n<form>\n<input type=hidden name=update value=yes>\n\n\n";
$query = "SELECT * FROM users WHERE approved='0'";
$query_result_handle = mysql_query ($query);
$num_of_rows = mysql_num_rows ($query_result_handle) ;
for ($count = 1; $row = mysql_fetch_row ($query_result_handle); ++$count)
{
echo "\n\n<hr>UserName: $row[1]<br>approve: <select size=1 name=approvehim><option>yes</option><option>no</option></select>\n";
echo "<input type=hidden name=username value=$row[1]>";
}
echo "\n\n\n<input type=submit value=submit name=xx>\n</form>";
////////////////////////////////////////////////////////////////////////////////////////
else:
/////// WHAT DO I PUT HERE ??????? <---------------
echo "Ok: updated";
endif;
////////////////////////////////////////////////////////////////////////////////////////
mysql_close($DB);
?>