Code
Code
<?php
define('DB_SERVER', ‘mydbserver’);
define('DB_USERNAME', 'admin');
define('DB_PASSWORD', 'Qwerty.123');
define('DB_DATABASE', 'myrds-db');
?>
Now Navigate to /var/www/html and create UserData.php file with below content
<?php include "../inc/dbinfo.inc"; ?>
<html>
<body>
<h1>User Data</h1>
<?php
VerifyEmployeesTable($connection, myrds-db);
$employee_name = htmlentities($_POST['NAME']);
$employee_address = htmlentities($_POST['ADDRESS']);
if (strlen($employee_name) || strlen($employee_address)) {
?>
<table border="0">
<tr>
<td>NAME</td>
<td>ADDRESS</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="text" name="ADDRESS" maxlength="90" size="60" />
</td>
<td>
</td>
</tr>
</table>
</form>
<tr>
<td>ID</td>
<td>NAME</td>
<td>ADDRESS</td>
</tr>
<?php
while($query_data = mysqli_fetch_row($result)) {
echo "<tr>";
"<td>",$query_data[1], "</td>",
"<td>",$query_data[2], "</td>";
echo "</tr>";
?>
</table>
<?php
mysqli_free_result($result);
mysqli_close($connection);
?>
</body>
</html>
<?php
$n = mysqli_real_escape_string($connection, $name);
$a = mysqli_real_escape_string($connection, $address);
NAME VARCHAR(45),
ADDRESS VARCHAR(90)
)";
$t = mysqli_real_escape_string($connection, $tableName);
$d = mysqli_real_escape_string($connection, $dbName);
$checktable = mysqli_query($connection,
TABLE_SCHEMA = '$d'");
return false;
}
?>