Location: PHPKode > projects > PDFdirectory > activate.php
<?php
$orgsql=mysql_real_escape_string($org);
$sql = "UPDATE `members` SET `active` = '0' WHERE orgid='".$orgsql."'";
$result1 = mysql_query($sql, $con) or die("Invalid query: " . mysql_error());

$sql = "SELECT `memberid` FROM teamref INNER JOIN members ON members.id=teamref.memberid WHERE members.orgid=".$orgsql;
$result1 = mysql_query($sql, $con) or die("Invalid query: " . mysql_error());

$numRows = mysql_num_rows($result1);

for($RowCount = 0; $RowCount < $numRows; $RowCount++){
    $mid = mysql_result($result1, $RowCount, 'memberid');
    $midsql = mysql_real_escape_string($mid);
    $sql = "UPDATE `members` SET `active` = '1' WHERE `id` = '".$midsql."'";
    $result = mysql_query($sql, $con) or die("Invalid query: " . mysql_error());	
}

?>
Return current item: PDFdirectory