I used a program called PHP Database Wizard to create the PHP scripting as I've never used it before. I've got installed the latest stable versions of Apache, MySQL, and PHP on my WinXP Home laptop. What ends up happening is instead of updating the table and displaying the updated information, it only refreshes the page with the old information. I can't figure any of this crap out.
Help.
<?php
require_once('Db\db_connection.php');
global $MyDb;
$actPage = $HTTP_SERVER_VARS["PHP_SELF"];
$maxRows = 24;
$pageNr = 0;
$rowbg = 'true';
$pageNr = $_POST['pageNr'];
$orderSql = $_POST['orderSql'];
$selectAllSql = "SELECT * FROM txtprices ".$filterSql;
$ResultAll = $MyDb->f_ExecuteSql($selectAllSql);
$ResultAllRows = $MyDb->f_GetSelectedRows($ResultAll);
$startRow = $pageNr * $maxRows;
$selectSql = "SELECT * FROM txtprices";
$limitSql = " LIMIT ".$startRow." , ".$maxRows;
$selectSql = $selectSql.$filterSql.$orderSql.$limitSql;
$Result = $MyDb->f_ExecuteSql($selectSql);
$Resultset = $MyDb->f_GetRecord($Result);
$ResultRowNr = $MyDb->f_GetSelectedRows($Result);
$actRow=0;
?>
<html>
<head>
<title>Ticket Prices</title>
<link href="Style/style.css" rel="stylesheet" type="text/css">
<script languange="javascript" src="Scripts/script.js"></script>
</head>
<body>
<form name="UpdateForm" method="post" action="<?php echo $PHP_SELF ?>">
<table width="330" border="0" align="center" cellpadding="0" cellspacing="0" class="tableborder">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<th class="th1" width="70">Ticket ID</th>
<th class="th1" width="130">Ticket Type</th>
<th class="th1">Regular Prices</th>
<th class="th1">Group Prices</th>
</tr>
<?php do { ?>
<tr <?php if ($rowbg =='true') { $rowbg='false'; echo 'class="tr1"';} else { $rowbg='true'; echo 'class="tr2"';} echo "onMouseOver=\"this.className='tract'\""; if ($rowbg == 'true') echo ' onMouseOut="this.className=\'tr2\'"'; else echo 'onMouseOut="this.className=\'tr1\'"';?> >
<td class="td1"><font face="verdana" color="#000000"><?php if ($Resultset['txtid'] != "") echo $Resultset['txtid']; else echo " ";?> </font></td>
<td class="td1"><font face="verdana" color="#000000"><?php if ($Resultset['type'] != "") echo $Resultset['type']; else echo " ";?> </font></td>
<td class="td1" align="center">
<input class="input_normal"
type="text"
name="rprices"
id="rprices"
value="<?php echo $Resultset['rprices']; ?>"
size="10"
maxlength="7"
onFocus="this.className='inputact'"
onBlur="this.className='inputOk'">
</td>
<td class="td1" align="center">
<input class="input_normal"
type="text"
name="gprices"
id="gprices"
value="<?php echo $Resultset['gprices']; ?>"
size="10"
maxlength="7"
onFocus="this.className='inputact'"
onBlur="this.className='inputOk'">
</td>
</tr>
<?php } while ($Resultset = $MyDb->f_GetRecord($Result)); ?>
</table>
</td>
</tr>
</table>
<center><input type="image" src="Images/update.gif" name="SubmitForm" border=0></center>
<input type="hidden" name="txtid" value="<?php echo $Resultset['txtid']; ?>">
</form>
</body>
</html>
<?php
$updateSql = "UPDATE txtprices SET rprices='" . $_POST['rprices'] . "', gprices='" . $_POST['gprices'] . "' WHERE txtid= '" . $_POST['txtid'] . "'";
echo $updateSql; //ECHO FOR DEBUGGING
$MyDb->f_ExecuteSql($updateSql);
?>