Professional Documents
Culture Documents
WT 14
WT 14
WT 14
Config:
<?php
$databaseHost = 'localhost';
$databaseName = 'student';
$databaseUsername = 'root';
$databasePassword = '';
$mysqli = mysqli_connect($databaseHost, $databaseUsername, $databasePassword,
$databaseName);
?>
Update:
<html>
<head>
<title>Update a Record in MySQL Database</title>
</head>
<body>
<?php
include_once("config.php");
if(isset($_POST['update']))
{
}
?>
<form method = "post" action = "<?php $_PHP_SELF ?>">
<table width = "400" border =" 0" cellspacing = "1"
cellpadding = "2">
<tr>
<td width = "100">ID</td>
<td><input name = "id" type = "text"
id = "id"></td>
</tr>
<tr>
<td width = "100">Name</td>
<td><input name = "name" type = "text"
id = "name"></td>
</tr>
<tr>
<td width = "100"> </td>
<td> </td>
</tr>
<tr>
<td width = "100"> </td>
<td>
<input name = "update" type = "submit"
id = "update" value = "Update">
</td>
</tr>
</table>
</form>
</body>
</html>
Output:
First:
Second:
Updated: