Created
July 23, 2019 15:56
-
-
Save MaheKarim/db8537af88134cddeb91c65317c78635 to your computer and use it in GitHub Desktop.
Wheres the wrong
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by PhpStorm. | |
* User: Mahe | |
* Ques: Sanitization in PHP | |
* Date: 23-Jul-19 | |
* Time: 4:05 AM | |
*/ | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title> | |
Milligram with PHP | |
</title> | |
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic"> | |
<link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css"> | |
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css"> | |
<style> | |
body{ | |
margin-top: 30px; | |
} | |
.ourFirstPTag{ | |
color: darkcyan; | |
font-family: bold; | |
font-size: 22px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="column column-60 column-offset-20"> | |
<h1>Office Counter</h1> | |
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> | |
</div> | |
</div> | |
<p> | |
<?php | |
$fname=''; | |
$lname =''; | |
?> | |
</p> | |
<div class="row"> | |
<div class="column column-60 column-offset-20"> | |
<p class="ourFirstPTag"> | |
<?php if (isset($_REQUEST['fname']) && !empty($_REQUEST['fname'])) ; | |
{ | |
$fname = htmlspecialchars( $_REQUEST['fname']); | |
}?> <br> | |
<?php if (isset($_REQUEST['lname']) && !empty($_REQUEST['lname'])) { | |
$lname = htmlspecialchars( $_REQUEST['lname']); | |
}?> | |
</p> | |
<p> | |
First Name: <?php $fname ;?> | |
First Name: <?php $lname ;?> | |
</p> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="column column-60 column-offset-20"> | |
<form method="POST"> | |
<label for="fname">First Counter</label> | |
<input type="text" name="fname" id="fname" value="<?php echo $fname; ?>"> | |
<label for="lname">Last Counter</label> | |
<input type="text" name="lname" id="lname" value="<?php echo $lname; ?>> | |
<button type="submit">Submit</button> | |
</form> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment