Skip to content
Snippets Groups Projects
Commit 99b0dc40 authored by Robert Anderson's avatar Robert Anderson
Browse files

Replaces session handling with $_POST

parent 20026eeb
No related branches found
No related tags found
No related merge requests found
...@@ -76,6 +76,7 @@ if (isset($_POST['frmaction']) && $_POST['frmaction'] == "add") { ...@@ -76,6 +76,7 @@ if (isset($_POST['frmaction']) && $_POST['frmaction'] == "add") {
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<input type="hidden" name="user_id" value="<?php echo $_POST['user_id']; ?>" />
<input type="submit" /> <input type="submit" />
</td> </td>
</tr> </tr>
...@@ -99,7 +100,7 @@ if (isset($_POST['frmaction']) && $_POST['frmaction'] == "add") { ...@@ -99,7 +100,7 @@ if (isset($_POST['frmaction']) && $_POST['frmaction'] == "add") {
$stmt = $db->prepare("INSERT INTO ${DB_TABLE_PREFIX}user_attributes (UserID,Name,Operator,Value) VALUES (?,?,?,?)"); $stmt = $db->prepare("INSERT INTO ${DB_TABLE_PREFIX}user_attributes (UserID,Name,Operator,Value) VALUES (?,?,?,?)");
$res = $stmt->execute(array( $res = $stmt->execute(array(
$_POST['attr_userid'], $_POST['user_id'],
$_POST['attr_name'], $_POST['attr_name'],
$_POST['attr_operator'], $_POST['attr_operator'],
$_POST['attr_value'], $_POST['attr_value'],
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include_once("includes/header.php"); include_once("includes/header.php");
include_once("includes/footer.php"); include_once("includes/footer.php");
include_once("includes/db.php"); include_once("includes/db.php");
...@@ -60,6 +61,7 @@ printHeader(array( ...@@ -60,6 +61,7 @@ printHeader(array(
<option disabled="disabled"> - - - - - - - - - - - </option> <option disabled="disabled"> - - - - - - - - - - - </option>
<option value="change">Change Attribute</option> <option value="change">Change Attribute</option>
</select> </select>
<input type="hidden" name="user_id" value="<?php echo $_POST['user_id']; ?>" />
</div> </div>
<p /> <p />
...@@ -75,6 +77,7 @@ printHeader(array( ...@@ -75,6 +77,7 @@ printHeader(array(
<?php <?php
if (isset($_POST['user_id'])) { if (isset($_POST['user_id'])) {
# Get old attributes # Get old attributes
$sql = " $sql = "
SELECT SELECT
...@@ -91,7 +94,9 @@ printHeader(array( ...@@ -91,7 +94,9 @@ printHeader(array(
while ($row = $res->fetchObject()) { while ($row = $res->fetchObject()) {
?> ?>
<tr class="resultsitem"> <tr class="resultsitem">
<td><input type="radio" name="attr_id" value="<?php echo $row->id; ?>"/><?php echo $row->id; ?></td> <td>
<input type="radio" name="attr_id" value="<?php echo $row->id; ?>"/><?php echo $row->id; ?>
</td>
<td><?php echo $row->name; ?></td> <td><?php echo $row->name; ?></td>
<td><?php echo $row->operator; ?></td> <td><?php echo $row->operator; ?></td>
<td><?php echo $row->value; ?></td> <td><?php echo $row->value; ?></td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment