|
html entities
|
application are taking data and processing like form data
|
|
if customer entered data is if html data, then it shows html
output in outputs so convert anything to text
|
|
|
How toconvert any data to text not an html
|
|
|
<?php
|
|
|
if (isset( $_POST['text'])){
|
how to check form is submitted, if form submitted
|
|
$text = htmlentities ($_POST['text']);
|
get the name date and convert to text and load to text variable
|
|
if(!empty($text))(
|
if it is not empty print thte text which is entered by uuer
|
|
echo $text;
|
if thers is no html entity ,it wil convert to html
|
|
}
|
|
|
else{
|
|
|
echo 'please enter some text..';
|
if no data after submit, tell to customer pls enter the data
|
|
}
|
|
|
}
|
|
|
?>
|
|
|
<form action="index.php"
method="POST">
|
whenever customer is entered text, after submit I t displayed in
php section display
|
|
<Input type="text" name="text">
|
|
|
<input type="submit" value="submit">
|
|
|
</form>
|
|
| htmlentities | ||||||
| isset | ||||||
| htmlentities | ||||||
| !empty | ||||||
| if else | ||||||
| echo | ||||||
| post | ||||||
|
No comments:
Post a Comment