I am attempting to make it so users can insert information into an HTML form like this
<form method="POST">
<textarea name="form" cols="58" rows="4" placeholder="form"></textarea>
<input type="submit" name="Create">
</form>
<?php
include("connection.php");
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$input = mysqli_real_escape_string($con, $_POST['form']);
$query = "insert into table (column) values('$input');
if (mysqli_query($con, $query)) {
header("Location: input.php");
}
?>
and then input.php is
<?php
include("connection.php");
$query = "SELECT * FROM table";
$execute = mysqli_query($con, $query);
if ($execute) {
while ($row = $execute->fetch_assoc()) {
echo $row['column'];
}
}
?>
However a user can just input raw HTML code like . How can I stop a user from inserting that and instead just display it as regular text?