Using the Sql ALTER TABLE statement, it is possible to rename a column name to the MySQL table in PHP.
syntax:
ALTER TABLE table_name CHANGE old_column_name new_column_name;

Example:


<?php
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$dbname = "basename";
$conn = mysqli_connect($dbhost, $dbuser, $dbpass , $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "ALTER TABLE membership
CHANGE `date` `date`";
if (mysqli_query($conn, $sql)) {
echo "The column has been added.";
} else {
echo "The column has not been added." . mysqli_error($conn);
}
mysqli_close($conn);
 ?>