The main pages should be index.html, About Us, Contact us, Gallery. Your Contact Us page must have a php form (Contact Us Form) that should be responsive and be very connected to the database that should accept the information.
Create a community website using html and css, for neighborhoods and small towns, include features such as an events calendar and forum where residents can post relevant questions and comments. You can also add a blog and newsletter where you can share neighborhood stories and keep people updated with the latest local news.
<html>
<head>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<style>
div.solid{
border-style: solid;
}
</style>
</head>
<body>
<h3 class="w3-center"><b>Word Removing</b></h3>
<br>
<div class="w3-light-grey w3-center w3-row" style="padding: 40px;">
<form action="" method="post">
<table>
<tr>
<td>
Remove word:</td> <td> <input type="text" name="removeword" class="w3-input" /> </td></tr>
<tr>
<td>
<br/><br/>
<center><input type="submit" name="submit" class="w3-button w3-blue" value="Submit"></center>
</td></tr>
</table>
</form>
</div>
<?php
if(!isset($_POST['submit'])){
?><div class="solid " style="margin-left: 50px;margin-right: 50px;margin-top:20px;"><?php
echo file_get_contents( "interview.txt"); // displays the content before removing lines containing word.
?>
</div>
<?php
}
else
if(isset($_POST['submit'])){
$rows = file("interview.txt");
$word=$_POST['removeword'];
$flag=0;
foreach($rows as $key => $row) {
if(preg_match("/($word)/", $row)) {
unset($rows[$key]);
$flag=1;
}
}
if($flag==0)
{
?><div class="solid" style="margin-left: 200px;margin-right: 50px;margin-top:20px;"><?php
echo "No word found"; // displays the error if no word found.
}
?>
</div><?php
file_put_contents("interview.txt", implode("\n", $rows));
?>
<div class="solid " style="margin-left: 50px;margin-right: 50px;margin-top:20px;"><?php
echo file_get_contents( "interview.txt" ); // displays the content after removing lines containing word.
}?></div>
</body>
</html>
Comments
Leave a comment