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
| hot linking means that we give link of an image from another website which is a bad practice as owner of that saite has to pay for the bandwidth ur site linked image is showing. | |
| e.g | |
| <img src="https://www.google.com/images/logos/google_logo_41.png">Google Logo</img> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>PHP Important Date Functions</title> | |
| </head> | |
| <body> | |
| <p>For PHP Date Functions, visit <a href="http://www.w3schools.com/php/php_ref_date.asp">W3schools PHP 5 Date/Time Functions</a></p> | |
| <p>For PHP Calendar Functions, visit <a href="http://www.w3schools.com/php/php_ref_calendar.asp">W3schools PHP 5 Calendar Functions</a></p> | |
| <?php |
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
| <!Doctype html> | |
| <html> | |
| <head> | |
| <title>preg_match() in PHP<title> | |
| </head> | |
| <body> | |
| <!-- | |
| The preg_match() function searches a string for pattern, returning true if the pattern exists, and false otherwise. | |
| PHP - Validate Name |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <style> | |
| .error {color: #FF0000;} | |
| </style> | |
| <title>Complete Form Validation</title> | |
| </head> | |
| <body> | |
| <p>Form Validation in PHP</p> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>File Upload</title> | |
| </head> | |
| <body> | |
| <!-- | |
| -------------------------------------------------------------------------------------------------------- | |
| To allow users to upload files from a form can be very useful. | |
| Look at the following HTML form for uploading files: |
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
| <?php | |
| /* | |
| Definition and Usage | |
| The mail() function allows you to send emails directly from a script. | |
| This function returns TRUE if the email was successfully accepted for delivery, otherwise it returns FALSE. | |
| Syntax | |
| mail(to,subject,message,headers,parameters) |
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
| <?php | |
| /* | |
| ------------------------------------------------- | |
| PHP E-mail Injections | |
| ------------------------------------------------- | |
| First, look at the PHP code from the previous chapter: | |
| */ | |
| ?> | |
| <html> | |
| <body> |
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
| For Details on PHP Filter Functions, visit: | |
| http://www.w3schools.com/php/php_ref_filter.asp | |
| & | |
| http://www.w3schools.com/php/php_filter.asp | |
| PHP Filter Introduction | |
| This PHP filters is used to validate and filter data coming from insecure sources, like user input. | |
| PHP Filter Functions |
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
| <?php | |
| /** | |
| * myClass | |
| *@author: Abdullah Butt | |
| *@param: | |
| */ | |
| class myClass | |
| { | |
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
| <?php | |
| $variables=get_defined_vars(); | |
| foreach($variables as $keys=>$val) | |
| { | |
| echo "$".$keys."=null;"."<br/>"; | |
| } | |
| /* | |
| Since get_defined_vars() only gets the variables at the point you call the function, there is a simple way to get the variables defined within the current scope. | |
| */ |