Got this error when trying to run one of my scripts anyone any ideas?
Notice: Undefined index: Update in c:websitequality_managementbackup_logbackup_edit.php on line 104
Thanks
Bazjones
[code=php]<form action=”<? echo($PHP_SELF); ?>” method=POST>
<table width=”129%” border=”0″>
<tr width=”100%”>
<?
$system = array(“Steelmaking Management”,
“Vessels”,
“Desulph”,
“Secondary Steelmaking”,
“BOS Engineering”,
“Quick Tap Phos”,
“Steeler”,
“X-Windows Load Host”,
“BOS Ladle Metallurgy”,
“Steelmaking File Server”);
# probably “nicer” to get above list of names from a database table?
echo <<<EOD
<td><strong>System:</strong></td>
<td><select name=”system” id=”system”>
EOD;
# add each eng as an option:
foreach($system as $value)
{
$selected = “”;
if($value == $get_info[“system”])
{
# mark this one as the selected entry:
$selected = ” selected”;
}
echo “<option$selected>$value</option>n”;
}
echo <<<EOD
</select></td>
EOD;
?>
</tr>
<tr>
<td> </td>
<td colspan=”9″> </td>
</tr>
<tr>
<td><strong>Comment:</strong></td>
<td colspan=”9″><textarea class=”textarea” name=”comment” rows=15 cols=120><? echo($get_info[“comment”]); ?></textarea></td>
</tr>
<tr>
<td> </td>
<td colspan=”9″> </td>
</tr>
<tr>
<td> </td>
<td colspan=”9″> </td>
</tr>
<tr>
<td> </td>
<td colspan=”6″><input name=”Update” type=SUBMIT class=”button” id=”Update2″ value=”Update”>
<input name=”Cancel” type=”button” id=”Cancel” onClick=”MM_goToURL(‘parent’,’/quality_management/backup_log/backup_report.php’);return document.MM_returnValue” value=”Cancel”></td>
<td width=”315″ colspan=”2″><div align=”right”> </div></td>
</tr>
</table>
<br>
</form>
<?
if($_POST[‘Update’])
{
$query = “UPDATE `backup` SET `System` = ‘”. $_POST[“system”] .”‘, `Comment` = ‘”.nl2br($_POST[“comment”]).”‘ WHERE `BackupID` = ‘$backupid'”;
$result = mysql_query($query);
if(!@header(“Location: backup_report.php”)){
echo(“<META HTTP-EQUIV=Refresh CONTENT=”1; URL=backup_report.php”>”);
echo(“<script>
window.top.location.href = ‘backup_report.php’;
</script>”);
echo(“You should now be redirected to the home page, click <a
href=’backup_report.php’>here</a> if you are not redirected.”);
};
}
?>