Modify data in a table in PHP

Description

The following code shows how to modify data in a table.

Example


/*from  w w w .j  a  v a  2  s. com*/
<?php
    $con=mysqli_connect("example.com","root","","test");
    // Check connection
    if (mysqli_connect_errno()) {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
    
    mysqli_query($con,"UPDATE employee SET name='newName'");
    
    mysqli_close($con);
?>




















Home »
  PHP Tutorial »
    MySQL »




MySQLi
MySQLi Object Oriented