View Single Post
  #4 (permalink)  
Old April 28th, 2004, 10:25 AM
Alex_forever Alex_forever is offline
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

here is the code:
if ($c && $d && $n)
    {//do database again
         require_once ('mysql_connect.php');

         $query = "UPDATE AddTable2 SET Code='$c', Description='$d', Name='$n' WHERE Id='$Id'";
        $result = @mysql_query($query) or die (mysql_error());
        //new screen
            if ($result)// it ran
            {
                echo '<p>You have updated your information</p>';
                include ('WSfooter.inc'); // Include the HTML footer.
                exit(); // Quit the script.
            }
            else
            {
                $message = '<p>Something is wrong</p><p>'. mysql_error() . '</p>';
            }

            mysql_close(); // Close the database connection.
    }
}

And no $id is not a field it is a row that I want php to search

Reply With Quote