}*/ // the result couldn't be prefetched, implies no id or name if ($result == false) { echo "Please enter a member number or name on the previous page."; echo " Click <a href = 'mainMenu.php'> here </a> to return."; } else { $numMemRows = $sql->num_rows($result); //echo $numMemRows; $cliplName = substr($lName, 0, 6) . '%'; //echo $cliplName; $clipfName = substr($fName, 0, 1) . '%'; //echo $clipfName; if ($numMemRows < 1) { echo "No member found <br>"; } elseif ($numMemRows == 1) { addressList($row[0]); } else { echo "There is more than one result <br>"; //echo $numMemRows; $value = "CardNo"; $label = "FirstName"; $mem = "memName"; echo "<form action=memGen.php method=GET>"; echo "<table>"; echo "<tr><td>"; echo '<select name="memName">'; while ($row = $sql->fetch_row($query_drop)) { var_dump($row); printf('<option value="%d">%d %s, %s</option>', $row['CardNo'], $row['CardNo'], $row['LastName'], $row['FirstName']); } echo '</select>';
$meminfo->ads_OK($MI_FIELDS['ads_OK']); $meminfo->save(); /* general note handling */ $notetext = $_POST['notetext']; $notetext = preg_replace("/\n/", "<br />", $notetext); $notetext = preg_replace("/\\'/", "''", $notetext); $checkQ = $sql->prepare("select * from memberNotes where note=? and cardno=?"); $checkR = $sql->execute($checkQ, array($notetext, $memNum)); if ($sql->num_rows($checkR) == 0) { $noteQ = $sql->prepare("insert into memberNotes (cardno, note, stamp, username) VALUES (?, ?, " . $sql->now() . ", ?)"); $noteR = $sql->execute($noteQ, array($memNum, $notetext, $username)); } // FIRE ALL UPDATE include 'custUpdates.php'; updateCustomerAllLanes($memNum); addressList($memNum); ?> <table> <tr> <?php if (!$username) { echo "<td><a href=\"{$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/members/memGen.php?memNum={$memID}\">Login to edit</a> | </td>"; } else { echo "<td><a href=limitedEdit.php?memnum={$memID}>[ Logged in ] Edit Info</a> | <a href=\"{$FANNIE_URL}auth/ui/loginform.php?logout=yes\">Log out</a></td>"; } ?> <td> </td> <td>