22 lines
500 B
PHP
Executable File
22 lines
500 B
PHP
Executable File
<?php
|
|
//Word censoring
|
|
|
|
$find = array('alex','billy','dale');
|
|
$replace = array('a**x', 'b***y', 'd**e');
|
|
|
|
|
|
if(isset($_POST["user_input"]) && !empty($_POST["user_input"])){
|
|
$user_input = $_POST['user_input'];
|
|
$user_input_new = str_ireplace($find, $replace, $user_input);
|
|
|
|
echo $user_input_new;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<form action="part2.php" method="POST">
|
|
<textarea name="user_input" cols="30" rows="6"><?php echo $user_input ;?></textarea><br><br>
|
|
<input type="submit" value="Submit">
|
|
|
|
</form>
|