Last active
June 30, 2022 11:40
-
-
Save Shakil-Shahadat/5ee21ddc3a18466fc11ec28d60674418 to your computer and use it in GitHub Desktop.
Miscellaneous PHP Codes
This file contains 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
<?php | |
// Todays' date in the format 2022-01-12 | |
echo date( 'Y-m-d' ); | |
// Decode 'encodeURIComponent' encoded string | |
urldecode( ); | |
// Sanitize $_POST array | |
foreach ( $_POST as $key => $value ) | |
{ | |
$_POST[ $key ] = $db->escapeString( $_POST[ $key ] ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment