</select> <input type="hidden" id="ddlProductId_val" value="waiting"> <div id="ddlProductId_msg"></div> </li> <li class="validated" id="ddlLocationId_li"> <label for="r_ddlLocationId">Location:</label> <div id="ddlLocationId_img"></div> <select class="validated" name="LocationId" id="ddlLocationId" > <option value="">Select a Location</option> <?php $DB = new conn(); foreach ($DB->getStorageLocations() as $loc) { ?> <option value="<?php echo $loc["storagelocation_id"]; ?> "><?php echo $loc["storagelocation_name"]; ?> </option><?php } ?> </select> <input type="hidden" id="ddlLocationId_val" value="waiting"> <div id="ddlLocationId_msg"></div> </li>
$output = ""; if ($id == "tbUsername") { $DB = new conn(); $DB->connect(); $username = $DB->sanitize($_POST["value"]); $sql = "Select count(*) from users where username = '******' and status != 'deleted'"; $result = $DB->query_scalar($sql); if ($result > 0) { $success = "fail"; $error = "Username Already Exists!"; } $DB->close(); } if ($id == "getStorageLocations") { $DB = new conn(); $output = $DB->getStorageLocations(); } if ($id == "getUsers") { $DB = new conn(); $output = $DB->getUsers(); } if ($id == "createCustomer") { $DB = new conn(); $DB->connect(); $firephp->log($_REQUEST); $firstname = $DB->sanitize($_REQUEST["FirstName"]); $lastname = $DB->sanitize($_REQUEST["LastName"]); $displayname = $firstname . " " . $lastname; $email = $DB->sanitize($_REQUEST["Email"]); $address = $DB->sanitize($_REQUEST["Address"]); $address2 = $DB->sanitize($_REQUEST["Address2"]);