PHP Filters in Hindi – PHP In Hindi

PHP Filters in Hindi:- PHP Filters Ko External Input Ko Validate And Sanitize Karne Ke Liye Istemal Kiya Jata Hain |

  • Validating data = Determine if the data is in proper form.
  • Sanitizing data = Remove any illegal character from the data.

Yadi Aapne HTML Full Course And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

PHP Filters in Hindi

PHP Filters Extensions Mai User Input Ke Data Ko Filter Karne Ke Liye Functions Hai, Ise Data Validation Ko Aasan Or Fast Karne Ke Liye Design Kiya Gaya Hain |

filter_list() Function Ka Istemal PHP File Extension Ko Display Karne Ke Liye Kiya Jata Hain |

Example:

<!DOCTYPE html>
<html>
  <head>
    <style>
      table, th, td {
          border: 1px solid Gray;
          border-collapse: collapse;
      }
      th, td {
          padding: 4px;
      }
    </style>
  </head>
<body>
  <table>
    <tr>
      <td>Filter Name</td>
      <td>Filter ID</td>
    </tr>
    <?php
    foreach (filter_list() as $id =>$filter) {
        echo '<tr><td>' . $filter . '</td><td>' . filter_id($filter) . '</td></tr>';
    }
    ?>
  </table>
</body>
</html>

Output:

Filter NameFilter ID
int257
boolean258
float259
validate_regexp272
validate_domain277
validate_url273
validate_email274
validate_ip275
validate_mac276
string513
stripped513
encoded514
special_chars515
full_special_chars522
unsafe_raw516
email517
url518
number_int519
number_float520
magic_quotes521
callback1024

PHP filter_var() Function in Hindi

Filter_var() Functions Validate And Sanitize Data Karta Hain | And Filter_var() Function Ek Single Variable Leta With Specified Filter |

PHP Sanitize a String in Hindi

<?php
$str = "<h1>Hello World!</h1>";
$newstr = filter_var($str, FILTER_SANITIZE_STRING);
echo $newstr;
?>

Output:

Hello World!

PHP Validate an Integer in Hindi

<?php
$int = 100;

if (!filter_var($int, FILTER_VALIDATE_INT) === false) {
  echo("Integer is valid");
} else {
  echo("Integer is not valid");
}
?>

Output:

Integer is valid
Danish Ali

I Am a Cyber Security Student & I have Skills C, C++, Python, HTML, CSS, PHP, SEO, Computer & Advance Hacking & Blogger & YouTuber.

Published by
Danish Ali

This Website Uses Cookies in order to offer you the most relevant information.Please accept cookies for optimal performance

Read More