<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
  <title>Upate how-to Database</title>
  <LINK REL="stylesheet" HREF="/PHP/style.css">
  <META NAME="author"      CONTENT="Denice Deatrich">
  <META NAME="description" CONTENT="PHP web-based MySQL DB Management">
  <META NAME="keywords"    CONTENT="PHP web MySQL database">
</head>

<body>
  <h1>Upate how-to Database</h1>
<?php
  
require( "db_connect.php" );
  if(
$argv ) {
    
$arg = $argv[0];
    if( (
$link=mysql_pconnect($DB_HOST, $DB_USER, $DB_PW)) ) {
      
$topic = trim( $topic );
      
$ver = trim( $ver );
      
$keywords = trim( $keywords );
      if(
strlen($ver) <= 0 ) {
        
$ver = "*";
      }
      if(
strlen($topic) <= 0 ) {
        
printFields( "TOPIC is a required field",
         
$topic, $os, $ver, $arch, $keywords, $notes );
      }
      else if(
strlen($keywords) <= 0 ) {
        
printFields( "KEYWORDS is a required field",
         
$topic, $os, $ver, $arch, $keywords, $notes );
      }
      else if(
$res=mysql_db_query($DB_NAME,
        
"update how_to set topic=\"$topic\", os=\"$os\", ver=\"$ver\", arch=\"$arch\", keywords=\"$keywords\", notes=\"$notes\" where rowid = $arg", $link) ) {
        echo
"Modification successful.";
      }
      else {
        
printFields( "UPDATE" );
        
printError( "UPDATE", $link );
      }
    }
/*
    else {
      printError( "CONNECT" );
    }
*/
  
}
?>
  <hr>
  <div class="footer">
  <address>
    <a href="mailto&#058;Denice&#046;Deatrich&#064;epfl.ch">Denice Deatrich</a>
  </address>
<!-- Created: Sun Jan 16 17:22:34 MET 2000 -->
<!-- hhmts start -->
Last modified: Sat Jun  3 11:09:06 MEST 2000
<!-- hhmts end -->
  </div>
</body>
</html>