Jump to content

Archived

This topic is now archived and is closed to further replies.

bazjones

PHP Error Message

Recommended Posts

Got this error when trying to run one of my scripts anyone any ideas?

Notice: Undefined index: Update in c:\website\quality_management\backup_log\backup_edit.php on line 104

Thanks

Bazjones

[code]<form action="<? echo($_SERVER['PHP_SELF']); ?>" method=POST>
  <table width="129%" border="0">
    <tr>
      <td width="68"><strong>LogID:</strong></td>
      <td colspan="9"><input type="TEXT" name="logid" size=150 value="<? echo($get_info["logid"]); ?>">
      </td>
    </tr>
    <tr>
      <td> </td>
      <td colspan="9"> </td>
    </tr>
    <tr width="100%">
      <?
$source = array("APP1",
                "APP2",
                "APP3",
                   "APP4");
                        
# probably "nicer" to get above list of names from a database table?
echo <<<EOD
  <td><strong>Source:</strong></td>
  <td><select name="source" id="source">
EOD;
# add each eng as an option:
foreach($source as $value)
{
  $selected = "";
  if($value == $get_info["source"])
  {
    # mark this one as the selected entry:
    $selected = " selected";
  }
  echo "<option$selected>$value</option>\n";
}
echo <<<EOD
</select></td>
EOD;
?>
      <?
$type = array("Event",
            "Warning",                             
             "Error");  
                        
# probably "nicer" to get above list of names from a database table?
echo <<<EOD

  <td><strong>Type:</strong></td>
  <td><select name="type" id="type">
EOD;
# add each eng as an option:
foreach($type as $value)
{
  $selected = "";
  if($value == $get_info["type"])
  {
    # mark this one as the selected entry:
    $selected = " selected";
  }
  echo "<option$selected>$value</option>\n";
}
echo <<<EOD
</select></td>
EOD;
?>

      <td><strong>Time:</strong></td>
      <td width="130">    
    <input name="logtime" type="TEXT" id="cal-field-1" value="<? echo($get_info["logtime"]); ?>" size="10" />
          <button type="submit" id="cal-button-1">...</button>
          <script type="text/javascript">
            Calendar.setup({
              inputField    : "cal-field-1",
              button        : "cal-button-1",
              align         : "Tr"
            });
          </script>
    </td>
    </tr>
    <tr>
      <td> </td>
      <td colspan="9"> </td>
    </tr>
    <tr>
      <td><strong>Description:</strong></td>
      <td colspan="9"><textarea class="textarea" name="logtext" rows=8 cols=150><? echo($get_info["logtext"]); ?></textarea></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/incident_log/incident_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 `incidentlog` SET `source` = '". $_POST["source"] ."', `type` = '". $_POST["type"] ."', `logtime` = '".$_POST["logtime"]."', `logtext` = '".$_POST["logtext"]."' WHERE `logid` = '$logid'";
$result = mysql_query($query);
if(!@header("Location: incident_report.php")){
echo("<META HTTP-EQUIV=Refresh CONTENT=\"1; URL=incident_report.php\">");
echo("<script>
window.top.location.href = 'incident_report.php';
</script>");
echo("You should now be redirected to the home page, click <a
    href='incident_report.php'>here</a> if you are not redirected.");
};

}
?>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.