<?php include_once "include/app/config.php"; include_once "include/data/DBCon.php"; $db = new DBCon(); $db->Link(); $db->setQueryStmt("SELECT * FROM User"); if (!$db->Query()) { echo $db->GetLastErrorMsg(); exit; } echo "<pre>"; print_r($db->GetAll()); echo "</pre>"; exit;
<?php $attributes = new attributeArray(); $attributes->load(); /* figure out a cleaner way to do this */ if (isset($_SESSION["APP"]["room"])) { $db = new DBCon(); $db->Link(); $strSQL = "SELECT * FROM ffpac.roomattribute WHERE RoomID = {$_SESSION["APP"]["room"]}"; $db->SetQueryStmt($strSQL); if ($db->Query()) { foreach ($db->GetAll() as $row) { $selectedAttributes[] = $row["AttributeID"]; } } } ?> <form method="post" name="attributes"> <input type="hidden" name="RoomID" value="<?php echo $_SESSION["APP"]["room"]; ?> " /> <?php foreach ($attributes->getArray() as $attribute) { ?> <div class="checkbox"><label for="att_<?php echo $attribute->getID(); ?> "> <input <?php if (isset($selectedAttributes)) {