├── PHPMailerAutoload.php ├── Rashmi_PHP_Pro ├── img │ ├── 20bgHBGSPHI-W037_GIH1A39QJ.1+21BGHUBLI.jpg │ ├── 35-flower-wallpapers.preview.jpg │ ├── 6.jpg │ └── 8 batch.jpg ├── p1.php ├── p10.php ├── p11.php ├── p12.php ├── p13.php ├── p14.php ├── p15.php ├── p16.php ├── p17.php ├── p18.php ├── p19.php ├── p2.php ├── p20.php ├── p21.php ├── p22.php ├── p23.php ├── p24.php ├── p25.php ├── p26.php ├── p27.php ├── p28.php ├── p29.php ├── p3.php ├── p30.php ├── p31.php ├── p32.php ├── p33.php ├── p34.php ├── p35.php ├── p36.php ├── p4.php ├── p5.php ├── p6.php ├── p7.php ├── p8.php ├── p9.php ├── process.php └── process1.php ├── examples ├── DKIM.phps ├── code_generator.phps ├── contactform.phps ├── contents.html ├── contentsutf8.html ├── exceptions.phps ├── gmail.phps ├── gmail_xoauth.phps ├── images │ ├── phpmailer.png │ └── phpmailer_mini.png ├── index.html ├── mail.phps ├── mailing_list.phps ├── pop_before_smtp.phps ├── scripts │ ├── XRegExp.js │ ├── shAutoloader.js │ ├── shBrushPhp.js │ ├── shCore.js │ └── shLegacy.js ├── send_file_upload.phps ├── send_multiple_file_upload.phps ├── sendmail.phps ├── signed-mail.phps ├── smtp.phps ├── smtp_check.phps ├── smtp_no_auth.phps ├── ssl_options.phps └── styles │ ├── shCore.css │ ├── shCoreDefault.css │ ├── shCoreDjango.css │ ├── shCoreEclipse.css │ ├── shCoreEmacs.css │ ├── shCoreFadeToGrey.css │ ├── shCoreMDUltra.css │ ├── shCoreMidnight.css │ ├── shCoreRDark.css │ ├── shThemeAppleScript.css │ ├── shThemeDefault.css │ ├── shThemeDjango.css │ ├── shThemeEclipse.css │ ├── shThemeEmacs.css │ ├── shThemeFadeToGrey.css │ ├── shThemeMDUltra.css │ ├── shThemeMidnight.css │ ├── shThemeRDark.css │ ├── shThemeVisualStudio.css │ └── wrapping.png ├── extras ├── EasyPeasyICS.php ├── README.md ├── htmlfilter.php └── ntlm_sasl_client.php ├── images ├── 03-08-1916781IMG-20151016-WA0027.jpg ├── 03-08-1919526IMG-20151014-WA0019.jpg ├── 03-08-196618IMG-20151029-WA0004.jpg ├── 30-07-191.jpg ├── 30-07-1912.jpg ├── 30-07-191564IMG-20151126-WA0004.jpg ├── 30-07-192.jpg ├── 30-07-1920bgHBGSPHI-W037_GIH1A39QJ.1+21BGHUBLI.jpg ├── 30-07-1940979IMG-20151121-WA0006.jpg ├── 30-07-1981476IMG-20151110-WA0019.jpg ├── 30-07-1987506IMG-20151121-WA0035.jpg └── logo.jpg ├── language ├── class.phpmailer.php ├── class.phpmaileroauth.php ├── class.phpmaileroauthgoogle.php ├── class.pop3.php ├── class.smtp.php ├── get_oauth_token.php ├── phpmailer.lang-am.php ├── phpmailer.lang-ar.php ├── phpmailer.lang-az.php ├── phpmailer.lang-ba.php ├── phpmailer.lang-be.php ├── phpmailer.lang-bg.php ├── phpmailer.lang-ca.php ├── phpmailer.lang-ch.php ├── phpmailer.lang-cs.php ├── phpmailer.lang-da.php ├── phpmailer.lang-de.php ├── phpmailer.lang-el.php ├── phpmailer.lang-eo.php ├── phpmailer.lang-es.php ├── phpmailer.lang-et.php ├── phpmailer.lang-fa.php ├── phpmailer.lang-fi.php ├── phpmailer.lang-fo.php ├── phpmailer.lang-fr.php ├── phpmailer.lang-gl.php ├── phpmailer.lang-he.php ├── phpmailer.lang-hr.php ├── phpmailer.lang-hu.php ├── phpmailer.lang-id.php ├── phpmailer.lang-it.php ├── phpmailer.lang-ja.php ├── phpmailer.lang-ka.php ├── phpmailer.lang-ko.php ├── phpmailer.lang-lt.php ├── phpmailer.lang-lv.php ├── phpmailer.lang-ms.php ├── phpmailer.lang-nb.php ├── phpmailer.lang-nl.php ├── phpmailer.lang-pl.php ├── phpmailer.lang-pt.php ├── phpmailer.lang-pt_br.php ├── phpmailer.lang-ro.php ├── phpmailer.lang-rs.php ├── phpmailer.lang-ru.php ├── phpmailer.lang-sk.php ├── phpmailer.lang-sl.php ├── phpmailer.lang-sv.php └── phpmailer.lang-tr.php ├── neha ├── 1.php ├── 10.php ├── 22.php └── p24.php ├── phpmailer.lang-uk.php ├── phpmailer.lang-vi.php ├── phpmailer.lang-zh.php ├── phpmailer.lang-zh_cn.php ├── phppro ├── aboutus.php ├── contact.php ├── css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap-theme.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ ├── font-awesome.css │ └── font-awesome.min.css ├── dbconfig.php ├── faq.php ├── feedback.php ├── files │ ├── newfile123.doc │ ├── newfile123.pdf │ └── test.txt ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── footer.php ├── footer1.php ├── header.php ├── header1.php ├── home1.php ├── home12.php ├── images │ ├── Veg-Fried-rice.jpg │ ├── all.jpg │ ├── idli.jpg │ ├── kfc.jpeg │ ├── logo.jpg │ ├── sat.jpg │ ├── thu.jpg │ ├── vada.jpg │ └── wed.jpg ├── imageslider.php ├── info.php ├── js │ ├── bootstrap.js │ ├── bootstrap.min.js │ └── npm.js ├── menu.php ├── new 1.txt ├── p1.php ├── p10.php ├── p11.php ├── p12.php ├── p13.php ├── p14.php ├── p15.php ├── p16.php ├── p17.php ├── p18.php ├── p19.php ├── p2.php ├── p20.php ├── p21.php ├── p22.php ├── p23.php ├── p24.php ├── p25.php ├── p26.php ├── p27.php ├── p28.php ├── p29.php ├── p3.php ├── p30.php ├── p31.php ├── p32.php ├── p33.php ├── p34.php ├── p35.php ├── p36.php ├── p37.php ├── p38.php ├── p39.php ├── p4.php ├── p40.php ├── p41.php ├── p42.php ├── p43.php ├── p5.php ├── p6.php ├── p7.php ├── p8.php ├── p9.php ├── php_constant.php ├── slider.php ├── sm.php ├── t1.php └── test123.php ├── sendsms ├── sendsms.php └── sms1.php ├── sm1.php ├── type1 ├── config1.php ├── delete1.php ├── insert1.php ├── update1.php └── view1.php ├── type2 ├── config2.php ├── delete2.php ├── insert2.php ├── update2.php └── view2.php ├── type3 ├── config3.php ├── delete3.php ├── insert3.php ├── update3.php └── view3.php ├── type4 ├── 1.html ├── 2.html ├── 3.html ├── 4.html ├── config.php ├── db1.php ├── delete.php ├── demo1.php ├── display.php ├── fileRead.php ├── fileUpload.php ├── insert.php ├── login_process.php ├── p1.php ├── p10.php ├── p11.php ├── p12.php ├── p13.php ├── p14.php ├── p15.php ├── p16.php ├── p17.php ├── p18.php ├── p19.php ├── p2.php ├── p20.php ├── p21.php ├── p22.php ├── p23.php ├── p24.php ├── p25.php ├── p26.php ├── p27.php ├── p28.php ├── p29.php ├── p3.php ├── p4.php ├── p5.php ├── p6.php ├── p7.php ├── p8.php ├── p9.php ├── update.php └── welcome.php └── webdesign_assign ├── Accordion.html ├── Accordion.php ├── Hoverable Dropdown.html ├── Hoverable Dropdown.php ├── Modal.html ├── Modal.php ├── dropdown.html ├── dropdown.php ├── login.html ├── login.php ├── login12.html ├── modal image.html ├── modal image.php ├── side navigation.html ├── side navigation.php ├── slideshow.html ├── slideshow.php ├── top navigation.html ├── top navigation.php ├── topnavhome.html └── topnavhome.php /PHPMailerAutoload.php: -------------------------------------------------------------------------------- 1 | 8 | * @author Jim Jagielski (jimjag) 9 | * @author Andy Prevost (codeworxtech) 10 | * @author Brent R. Matzelle (original founder) 11 | * @copyright 2012 - 2014 Marcus Bointon 12 | * @copyright 2010 - 2012 Jim Jagielski 13 | * @copyright 2004 - 2009 Andy Prevost 14 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 15 | * @note This program is distributed in the hope that it will be useful - WITHOUT 16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 | * FITNESS FOR A PARTICULAR PURPOSE. 18 | */ 19 | 20 | /** 21 | * PHPMailer SPL autoloader. 22 | * @param string $classname The name of the class to load 23 | */ 24 | function PHPMailerAutoload($classname) 25 | { 26 | //Can't use __DIR__ as it's only in PHP 5.3+ 27 | $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; 28 | if (is_readable($filename)) { 29 | require $filename; 30 | } 31 | } 32 | 33 | if (version_compare(PHP_VERSION, '5.1.2', '>=')) { 34 | //SPL autoloading was introduced in PHP 5.1.2 35 | if (version_compare(PHP_VERSION, '5.3.0', '>=')) { 36 | spl_autoload_register('PHPMailerAutoload', true, true); 37 | } else { 38 | spl_autoload_register('PHPMailerAutoload'); 39 | } 40 | } else { 41 | /** 42 | * Fall back to traditional autoload for old PHP versions 43 | * @param string $classname The name of the class to load 44 | */ 45 | function __autoload($classname) 46 | { 47 | PHPMailerAutoload($classname); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/img/20bgHBGSPHI-W037_GIH1A39QJ.1+21BGHUBLI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/Rashmi_PHP_Pro/img/20bgHBGSPHI-W037_GIH1A39QJ.1+21BGHUBLI.jpg -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/img/35-flower-wallpapers.preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/Rashmi_PHP_Pro/img/35-flower-wallpapers.preview.jpg -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/img/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/Rashmi_PHP_Pro/img/6.jpg -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/img/8 batch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/Rashmi_PHP_Pro/img/8 batch.jpg -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p1.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p10.php: -------------------------------------------------------------------------------- 1 | $amount){ 6 | echo "Insufficiant Funds"; 7 | }else{ 8 | echo "Available Amount is : ".($amount-$withdrawal); 9 | } 10 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p11.php: -------------------------------------------------------------------------------- 1 | "; 6 | echo "$account1
$account2"; 7 | ?> 8 | 9 |
10 |

11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p12.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |

4 |

5 | 6 |
7 | 8 | "; 12 | if($number<10) 13 | echo "It is Single Digit"; 14 | else if($number>10 and $number<100) 15 | echo "It is Double Digit"; 16 | else if($number>100 and $number<1000) 17 | echo "It is Triple Digit"; 18 | else if($number>1000 and $number<10000) 19 | echo "It is Four Digit"; 20 | else if($number>10000) 21 | echo "It is More than Four Digits"; 22 | } 23 | 24 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p13.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

5 | 6 |

7 | 8 |
9 | 10 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p14.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p15.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p16.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

5 | 6 |
7 | 8 | "; 13 | echo "1. Dog"; 14 | }else if($number==='2'){ 15 | echo "List of Flowers
"; 16 | echo "1. Lotus"; 17 | }else if($number==='3'){ 18 | echo "List of Colors
"; 19 | echo "1. Red"; 20 | }else{ 21 | echo "Invalid Number"; 22 | } 23 | } 24 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p17.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

5 | 6 |
7 | 8 | "; 14 | echo "1. Dog"; 15 | break; 16 | case '2': 17 | echo "List of Flowers
"; 18 | echo "1. Lotus"; 19 | break; 20 | case '3': 21 | echo "List of Colors
"; 22 | echo "1. Red"; 23 | break; 24 | default: 25 | echo "Invalid Number"; 26 | break; 27 | } 28 | } 29 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p18.php: -------------------------------------------------------------------------------- 1 | "; 6 | $counter++; 7 | } 8 | echo "
count:$counter"; 9 | 10 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p19.php: -------------------------------------------------------------------------------- 1 | "; 5 | } 6 | 7 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p2.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p20.php: -------------------------------------------------------------------------------- 1 | "; 6 | $i++; 7 | } 8 | 9 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p21.php: -------------------------------------------------------------------------------- 1 | "; 7 | } 8 | ?> 9 | 10 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p22.php: -------------------------------------------------------------------------------- 1 | "; 6 | 7 | foreach ($names as $value) { 8 | echo "$value
"; 9 | } 10 | /* 11 | Array is index is of type integer is called Numeric Array 12 | Array is index is of type String is called Associative Array 13 | */ 14 | ?> 15 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p23.php: -------------------------------------------------------------------------------- 1 | "; 4 | echo $number[3]."
"; 5 | echo $number[4]."
"; 6 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p24.php: -------------------------------------------------------------------------------- 1 | 5000,"ramesh"=>10000,"ujwal"=>2000); 3 | echo $emp["ramesh"]."
"; 4 | echo $emp["ujwal"]."
"; 5 | echo $emp["vijay"]."
"; 6 | 7 | 8 | 9 | 10 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p25.php: -------------------------------------------------------------------------------- 1 | 20000,"lokesh"=>5000,"rajesh"=>2000); 3 | foreach ($emp as $key => $value) { 4 | echo $key." Salary is ".$emp[$key]."
"; 5 | } 6 | 7 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p26.php: -------------------------------------------------------------------------------- 1 | array( 4 | "maths"=>35, 5 | "science"=>45, 6 | "kannada"=>56 7 | ), 8 | "ujwal"=>array( 9 | "maths"=>55, 10 | "science"=>65, 11 | "kannada"=>54 12 | ) 13 | ); 14 | 15 | echo $result["vijay"]["science"]."
"; 16 | echo $result["ujwal"]["kannada"]."
"; 17 | 18 | 19 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p28.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | //explode 9 | $string1 = "$1000 | $2000 | $500| $3000"; 10 | print_r(explode("|",$string1)); 11 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p29.php: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | Setting Cookies with PHP 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p3.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p30.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Accessing Cookies with PHP 4 | 5 | 6 | "; 8 | 9 | /* is equivalent to */ 10 | // echo $HTTP_COOKIE_VARS["name"]. "
"; 11 | 12 | echo $_COOKIE["age"] . "
"; 13 | 14 | /* is equivalent to */ 15 | // echo $HTTP_COOKIE_VARS["age"] . "
"; 16 | ?> 17 | 18 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p31.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p32.php: -------------------------------------------------------------------------------- 1 | "; 5 | echo $_SESSION['email']; 6 | /*Un set the Session Data */ 7 | unset($_SESSION['email']); 8 | session_destroy(); 9 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p33.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | GET Request 6 | 7 | 8 |
9 | 10 |

11 | 12 |

13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p34.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | POST Request 6 | 7 | 8 |
9 | 10 |

11 | 12 |

13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p35.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | File Upload 5 | 6 | 7 |
8 | 9 | 10 | 11 |
12 | 13 | 14 | 204800){ 29 | $error[]="File Size must be Less than 2 MB"; 30 | } 31 | 32 | if(empty($error)==true){ 33 | move_uploaded_file($file_tmp, 'img/'.$file_name); 34 | echo "Success"; 35 | }else{ 36 | print_r($error); 37 | } 38 | } 39 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p36.php: -------------------------------------------------------------------------------- 1 | 7 |
8 | Download
9 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p4.php: -------------------------------------------------------------------------------- 1 | "; 4 | echo "$num * 2 = ".($num*2)."
"; 5 | echo "$num * 3 = ".($num*3)."
"; 6 | echo "$num * 4 = ".($num*4)."
"; 7 | echo "$num * 5 = ".($num*5)."
"; 8 | echo "$num * 6 = ".($num*6)."
"; 9 | echo "$num * 7 = ".($num*7)."
"; 10 | echo "$num * 8 = ".($num*8)."
"; 11 | echo "$num * 9 = ".($num*9)."
"; 12 | echo "$num * 10 = ".($num*10)."
"; 13 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p5.php: -------------------------------------------------------------------------------- 1 | "; 7 | $area=3.142 * ($radius * $radius); 8 | print $area; 9 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p6.php: -------------------------------------------------------------------------------- 1 | "; 8 | $area=$width * $height; 9 | print $area; 10 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p7.php: -------------------------------------------------------------------------------- 1 | 18) 5 | print "Your Age is $age and Eligible for Voting"; 6 | else 7 | print "Minimum age is 18. and your age is $age. Not Eligible for Voting"; 8 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p8.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/p9.php: -------------------------------------------------------------------------------- 1 | "; 4 | echo --$num."
"; 5 | echo $num; 6 | 7 | ?> -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/process.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rashmi_PHP_Pro/process1.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/DKIM.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 16 | //Set an alternative reply-to address 17 | $mail->addReplyTo('replyto@example.com', 'First Last'); 18 | //Set who the message is to be sent to 19 | $mail->addAddress('whoto@example.com', 'John Doe'); 20 | //Set the subject line 21 | $mail->Subject = 'PHPMailer DKIM test'; 22 | //This should be the same as the domain of your From address 23 | $mail->DKIM_domain = 'example.com'; 24 | //Path to your private key file 25 | $mail->DKIM_private = 'dkim_private.pem'; 26 | //Set this to your own selector 27 | $mail->DKIM_selector = 'phpmailer'; 28 | //If your private key has a passphrase, set it here 29 | $mail->DKIM_passphrase = ''; 30 | //The identity you're signing as - usually your From address 31 | $mail->DKIM_identity = $mail->From; 32 | 33 | //send the message, check for errors 34 | if (!$mail->send()) { 35 | echo "Mailer Error: " . $mail->ErrorInfo; 36 | } else { 37 | echo "Message sent!"; 38 | } 39 | -------------------------------------------------------------------------------- /examples/contents.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/examples/contents.html -------------------------------------------------------------------------------- /examples/contentsutf8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PHPMailer Test 6 | 7 | 8 |
9 |

This is a test of PHPMailer.

10 |
11 | PHPMailer rocks 12 |
13 |

This example uses HTML.

14 |

Chinese text: 郵件內容為空

15 |

Russian text: Пустое тело сообщения

16 |

Armenian text: Հաղորդագրությունը դատարկ է

17 |

Czech text: Prázdné tělo zprávy

18 |

Emoji: 😂 🦄 💥 📤 📧

19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/exceptions.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 14 | //Set an alternative reply-to address 15 | $mail->addReplyTo('replyto@example.com', 'First Last'); 16 | //Set who the message is to be sent to 17 | $mail->addAddress('whoto@example.com', 'John Doe'); 18 | //Set the subject line 19 | $mail->Subject = 'PHPMailer Exceptions test'; 20 | //Read an HTML message body from an external file, convert referenced images to embedded, 21 | //and convert the HTML into a basic plain-text alternative body 22 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 23 | //Replace the plain text body with one created manually 24 | $mail->AltBody = 'This is a plain-text message body'; 25 | //Attach an image file 26 | $mail->addAttachment('images/phpmailer_mini.png'); 27 | //send the message 28 | //Note that we don't need check the response from this because it will throw an exception if it has trouble 29 | $mail->send(); 30 | echo "Message sent!"; 31 | } catch (phpmailerException $e) { 32 | echo $e->errorMessage(); //Pretty error messages from PHPMailer 33 | } catch (Exception $e) { 34 | echo $e->getMessage(); //Boring error messages from anything else! 35 | } 36 | -------------------------------------------------------------------------------- /examples/images/phpmailer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/examples/images/phpmailer.png -------------------------------------------------------------------------------- /examples/images/phpmailer_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/examples/images/phpmailer_mini.png -------------------------------------------------------------------------------- /examples/mail.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 12 | //Set an alternative reply-to address 13 | $mail->addReplyTo('replyto@example.com', 'First Last'); 14 | //Set who the message is to be sent to 15 | $mail->addAddress('whoto@example.com', 'John Doe'); 16 | //Set the subject line 17 | $mail->Subject = 'PHPMailer mail() test'; 18 | //Read an HTML message body from an external file, convert referenced images to embedded, 19 | //convert HTML into a basic plain-text alternative body 20 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 21 | //Replace the plain text body with one created manually 22 | $mail->AltBody = 'This is a plain-text message body'; 23 | //Attach an image file 24 | $mail->addAttachment('images/phpmailer_mini.png'); 25 | 26 | //send the message, check for errors 27 | if (!$mail->send()) { 28 | echo "Mailer Error: " . $mail->ErrorInfo; 29 | } else { 30 | echo "Message sent!"; 31 | } 32 | -------------------------------------------------------------------------------- /examples/send_file_upload.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 18 | $mail->addAddress('whoto@example.com', 'John Doe'); 19 | $mail->Subject = 'PHPMailer file sender'; 20 | $mail->Body = 'My message body'; 21 | // Attach the uploaded file 22 | $mail->addAttachment($uploadfile, 'My uploaded file'); 23 | if (!$mail->send()) { 24 | $msg .= "Mailer Error: " . $mail->ErrorInfo; 25 | } else { 26 | $msg .= "Message sent!"; 27 | } 28 | } else { 29 | $msg .= 'Failed to move file to ' . $uploadfile; 30 | } 31 | } 32 | ?> 33 | 34 | 35 | 36 | 37 | PHPMailer Upload 38 | 39 | 40 | 41 |
42 | Send this file: 43 | 44 |
45 | 48 | 49 | -------------------------------------------------------------------------------- /examples/send_multiple_file_upload.phps: -------------------------------------------------------------------------------- 1 | setFrom('from@example.com', 'First Last'); 13 | $mail->addAddress('whoto@example.com', 'John Doe'); 14 | $mail->Subject = 'PHPMailer file sender'; 15 | $mail->Body = 'My message body'; 16 | //Attach multiple files one by one 17 | for ($ct = 0; $ct < count($_FILES['userfile']['tmp_name']); $ct++) { 18 | $uploadfile = tempnam(sys_get_temp_dir(), sha1($_FILES['userfile']['name'][$ct])); 19 | $filename = $_FILES['userfile']['name'][$ct]; 20 | if (move_uploaded_file($_FILES['userfile']['tmp_name'][$ct], $uploadfile)) { 21 | $mail->addAttachment($uploadfile, $filename); 22 | } else { 23 | $msg .= 'Failed to move file to ' . $uploadfile; 24 | } 25 | } 26 | if (!$mail->send()) { 27 | $msg .= "Mailer Error: " . $mail->ErrorInfo; 28 | } else { 29 | $msg .= "Message sent!"; 30 | } 31 | } 32 | ?> 33 | 34 | 35 | 36 | 37 | PHPMailer Upload 38 | 39 | 40 | 41 |
42 | 43 | Select one or more files: 44 | 45 | 46 |
47 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /examples/sendmail.phps: -------------------------------------------------------------------------------- 1 | isSendmail(); 12 | //Set who the message is to be sent from 13 | $mail->setFrom('from@example.com', 'First Last'); 14 | //Set an alternative reply-to address 15 | $mail->addReplyTo('replyto@example.com', 'First Last'); 16 | //Set who the message is to be sent to 17 | $mail->addAddress('whoto@example.com', 'John Doe'); 18 | //Set the subject line 19 | $mail->Subject = 'PHPMailer sendmail test'; 20 | //Read an HTML message body from an external file, convert referenced images to embedded, 21 | //convert HTML into a basic plain-text alternative body 22 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 23 | //Replace the plain text body with one created manually 24 | $mail->AltBody = 'This is a plain-text message body'; 25 | //Attach an image file 26 | $mail->addAttachment('images/phpmailer_mini.png'); 27 | 28 | //send the message, check for errors 29 | if (!$mail->send()) { 30 | echo "Mailer Error: " . $mail->ErrorInfo; 31 | } else { 32 | echo "Message sent!"; 33 | } 34 | -------------------------------------------------------------------------------- /examples/styles/shThemeAppleScript.css: -------------------------------------------------------------------------------- 1 | .syntaxhighlighter.applescript{background:white;font-size:1em;color:black;} 2 | .syntaxhighlighter.applescript div,.syntaxhighlighter.applescript code{font:1em/1.25 Verdana,sans-serif !important;} 3 | .syntaxhighlighter.applescript .code .line{overflow:hidden !important;} 4 | .syntaxhighlighter.applescript .code .line.highlighted{background:#b5d5ff !important;} 5 | .syntaxhighlighter.applescript .color1{color:#000000 !important;} 6 | .syntaxhighlighter.applescript .color2{color:#000000 !important;} 7 | .syntaxhighlighter.applescript .color3{color:#000000 !important;font-weight:bold !important;} 8 | .syntaxhighlighter.applescript .keyword{color:#000000 !important;font-weight:bold !important;} 9 | .syntaxhighlighter.applescript .color4{color:#0000ff !important;font-style:italic !important;} 10 | .syntaxhighlighter.applescript .comments{color:#4c4d4d !important;} 11 | .syntaxhighlighter.applescript .plain{color:#408000 !important;} 12 | .syntaxhighlighter.applescript .string{color:#000000 !important;} 13 | .syntaxhighlighter.applescript .commandNames{color:#0000ff !important;font-weight:bold !important;} 14 | .syntaxhighlighter.applescript .parameterNames{color:#0000ff !important;} 15 | .syntaxhighlighter.applescript .classes{color:#0000ff !important;font-style:italic !important;} 16 | .syntaxhighlighter.applescript .properties{color:#6c04d4 !important;} 17 | .syntaxhighlighter.applescript .enumeratedValues{color:#4a1e7f !important;} 18 | .syntaxhighlighter.applescript .additionCommandNames{color:#0016b0 !important;font-weight:bold !important;} 19 | .syntaxhighlighter.applescript .additionParameterNames{color:#0016b0 !important;} 20 | .syntaxhighlighter.applescript .additionClasses{color:#0016b0 !important;font-style:italic !important;} 21 | .syntaxhighlighter.applescript .spaces{display:inline-block;height:0 !important;font-size:1.75em !important;line-height:0 !important;} 22 | -------------------------------------------------------------------------------- /examples/styles/wrapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/examples/styles/wrapping.png -------------------------------------------------------------------------------- /extras/README.md: -------------------------------------------------------------------------------- 1 | # PHPMailer Extras 2 | 3 | These classes provide optional additional functions to PHPMailer. 4 | 5 | These are not loaded by the PHPMailer autoloader, so in some cases you may need to `require` them yourself before using them. 6 | 7 | ## EasyPeasyICS 8 | 9 | This class was originally written by Manuel Reinhard and provides a simple means of generating ICS/vCal files that are used in sending calendar events. PHPMailer does not use it directly, but you can use it to generate content appropriate for placing in the `Ical` property of PHPMailer. The PHPMailer project is now its official home as Manuel has given permission for that and is no longer maintaining it himself. 10 | 11 | ## htmlfilter 12 | 13 | This class by Konstantin Riabitsev and Jim Jagielski implements HTML filtering to remove potentially malicious tags, such as ` -------------------------------------------------------------------------------- /phppro/footer1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /phppro/header.php: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 |
12 | -------------------------------------------------------------------------------- /phppro/header1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 27 | 28 | 29 |
30 | 42 |
-------------------------------------------------------------------------------- /phppro/home1.php: -------------------------------------------------------------------------------- 1 | 4 |
5 | 8 |
-------------------------------------------------------------------------------- /phppro/home12.php: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /phppro/images/Veg-Fried-rice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/Veg-Fried-rice.jpg -------------------------------------------------------------------------------- /phppro/images/all.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/all.jpg -------------------------------------------------------------------------------- /phppro/images/idli.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/idli.jpg -------------------------------------------------------------------------------- /phppro/images/kfc.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/kfc.jpeg -------------------------------------------------------------------------------- /phppro/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/logo.jpg -------------------------------------------------------------------------------- /phppro/images/sat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/sat.jpg -------------------------------------------------------------------------------- /phppro/images/thu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/thu.jpg -------------------------------------------------------------------------------- /phppro/images/vada.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/vada.jpg -------------------------------------------------------------------------------- /phppro/images/wed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/PHP/634da6908a89bcfd8e8304740eb20799d795e0b1/phppro/images/wed.jpg -------------------------------------------------------------------------------- /phppro/imageslider.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 | 14 | 15 | 17 | 19 | 20 | -------------------------------------------------------------------------------- /phppro/info.php: -------------------------------------------------------------------------------- 1 | 4 | 13 | -------------------------------------------------------------------------------- /phppro/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /phppro/menu.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 24 | 25 | 26 |
27 | 34 |
35 | -------------------------------------------------------------------------------- /phppro/new 1.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My First PHP Program 5 | 6 | 7 | 8 | 9 |

Welcome 10 | 13 | 14 |

15 | 16 | -------------------------------------------------------------------------------- /phppro/p11.php: -------------------------------------------------------------------------------- 1 | loops through block of code a specified number of times 7 | 2. While -> loops through block of code if and as long as condition is true 8 | 3. do..while ->loops through block of code once,and repeats till condition is true 9 | 4. foreach ->loops through block of code for each element is array 10 | */ 11 | 12 | //Example using For Loops 13 | include 'header.php'; 14 | ?> 15 |
16 |
17 |
18 |
19 | 20 | 21 | 22 |
23 | 24 |
25 | 26 |
27 |

28 | "; 34 | } 35 | } 36 | 37 | ?> 38 |

39 |
40 |
41 |
42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /phppro/p12.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | "; 11 | } 12 | for($i=9;$i>0;$i--){ 13 | for($j=0;$j<$i;$j++){ 14 | echo " * "; 15 | } 16 | echo "
"; 17 | } 18 | } 19 | ?> 20 | -------------------------------------------------------------------------------- /phppro/p13.php: -------------------------------------------------------------------------------- 1 | " ); 11 | } 12 | 13 | //echo ("Loop stopped at i = $i and num = $num" ); 14 | ?> -------------------------------------------------------------------------------- /phppro/p14.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p15.php: -------------------------------------------------------------------------------- 1 | '; 13 | $no++; 14 | } 15 | ?> -------------------------------------------------------------------------------- /phppro/p16.php: -------------------------------------------------------------------------------- 1 | "; 24 | } 25 | 26 | /* Second method to create array. */ 27 | $numbers[0] = "one"; 28 | $numbers[1] = "two"; 29 | $numbers[2] = "three"; 30 | $numbers[3] = "four"; 31 | $numbers[4] = "five"; 32 | 33 | foreach( $numbers as $value ) { 34 | echo "Value is $value
"; 35 | } 36 | ?> -------------------------------------------------------------------------------- /phppro/p17.php: -------------------------------------------------------------------------------- 1 | 2000, "Deepa" => 1000, "Ujwal" => 500); 5 | 6 | echo "Salary of Vijay is ". $salaries['Vijay'] . "
"; 7 | echo "Salary of Deepa is ". $salaries['Deepa']. "
"; 8 | echo "Salary of Ujwal is ". $salaries['Ujwal']. "
"; 9 | 10 | /* Second method to create array. */ 11 | $salaries['Vijay'] = "high"; 12 | $salaries['Deepa'] = "medium"; 13 | $salaries['Ujwal'] = "low"; 14 | 15 | echo "Salary of Vijay is ". $salaries['Vijay'] . "
"; 16 | echo "Salary of Deepa is ". $salaries['Deepa']. "
"; 17 | echo "Salary of Ujwal is ". $salaries['Ujwal']. "
"; 18 | ?> 19 | -------------------------------------------------------------------------------- /phppro/p18.php: -------------------------------------------------------------------------------- 1 | array ( 7 | "physics" => 35, 8 | "maths" => 30, 9 | "chemistry" => 39 10 | ), 11 | 12 | "Deepa" => array ( 13 | "physics" => 30, 14 | "maths" => 32, 15 | "chemistry" => 29 16 | ), 17 | 18 | "Ujwal" => array ( 19 | "physics" => 31, 20 | "maths" => 22, 21 | "chemistry" => 39 22 | ) 23 | ); 24 | 25 | /* Accessing multi-dimensional array values */ 26 | echo "Marks for Vijay in physics : " ; 27 | echo $marks['Vijay']['physics'] . "
"; 28 | 29 | echo "Marks for Deepa in maths : "; 30 | echo $marks['Deepa']['maths'] . "
"; 31 | 32 | echo "Marks for Ujwal in chemistry : " ; 33 | echo $marks['Ujwal']['chemistry'] . "
"; 34 | 35 | 36 | ?> -------------------------------------------------------------------------------- /phppro/p19.php: -------------------------------------------------------------------------------- 1 | "; 10 | 11 | $literally = "My $variable will print!\\n"; 12 | 13 | print($literally); 14 | 15 | ?> -------------------------------------------------------------------------------- /phppro/p2.php: -------------------------------------------------------------------------------- 1 | ".date('d/m/Y')."
"; 5 | echo date('D-m-y'); 6 | echo "
".date('d/m/Y H:i:sa'); 7 | 8 | $now=new DateTime(); 9 | echo "
".$now->format('d-M-Y'); 10 | 11 | ?> -------------------------------------------------------------------------------- /phppro/p20.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p21.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p22.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p23.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p24.php: -------------------------------------------------------------------------------- 1 | "; 8 | //explode 9 | $string1 = "$1000 | $2000 | $500| $3000"; 10 | print_r(explode("|",$string1)); 11 | 12 | 13 | 14 | //join 15 | $jin=array("Example","for","Join","Function"); 16 | echo join(" * ",$jin); 17 | 18 | 19 | echo "
"; 20 | //string reverse 21 | $name='Vijay'; 22 | echo "Examp for Reverse String :"; 23 | echo strrev($name); 24 | 25 | //First Character Lowercase 26 | echo "
"; 27 | echo lcfirst("Hello World!"); 28 | 29 | //Trim 30 | $str = "Have a Good Day!"; 31 | echo $str . "
"; 32 | echo trim($str,"Hello"); 33 | 34 | ?> -------------------------------------------------------------------------------- /phppro/p25.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p26.php: -------------------------------------------------------------------------------- 1 | "; 26 | echo "Your Age is ".$_GET['age']; 27 | exit(); 28 | } 29 | } 30 | ?> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /phppro/p27.php: -------------------------------------------------------------------------------- 1 | "; 8 | echo "Your Age ".$_POST['age']."
"; 9 | exit(); 10 | } 11 | } 12 | ?> 13 | 14 | 15 |
16 | 17 | 18 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /phppro/p28.php: -------------------------------------------------------------------------------- 1 | "; 8 | echo "Your Age ".$_REQUEST['age']."
"; 9 | exit(); 10 | } 11 | } 12 | ?> 13 | 14 | 15 |
16 | 17 | 18 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /phppro/p29.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 |
9 |
10 |

Testing using Include Function in PHP

11 |
12 |
-------------------------------------------------------------------------------- /phppro/p3.php: -------------------------------------------------------------------------------- 1 | ";//Integer 6 | 7 | $b=2.345; 8 | print($b); //Double 9 | 10 | $c="My Name is Vijay"; 11 | print('
'.$c.'
');//String 12 | 13 | $d=array("Apple","Orange","Banana"); 14 | print_r($d); // Array Variables 15 | echo '
'.$d[0]; 16 | echo '
'.$d[1]; 17 | 18 | $message=" 19 | 20 | 21 |

Example for PHP Variables

22 |

Example for PHP Variables

23 |

Example for PHP Variables

24 |

Example for PHP Variables

25 |
Example for PHP Variables
26 |
Example for PHP Variables
27 | 28 | "; 29 | 30 | echo $message; 31 | ?> -------------------------------------------------------------------------------- /phppro/p30.php: -------------------------------------------------------------------------------- 1 | 2 | 9 |
10 |
11 |

Testing using require Function in PHP

12 |
13 |
-------------------------------------------------------------------------------- /phppro/p32.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p33.php: -------------------------------------------------------------------------------- 1 | This is an Example for calling function with Parameters"; 12 | echo "
value Number 1 is :$num1
Value of Number 2 is :$num2"; 13 | } 14 | 15 | demo1(20,30); 16 | 17 | 18 | /* Function with Reference variable */ 19 | function demo2(&$num){ 20 | $num+=20; 21 | } 22 | $original=100; 23 | echo "
value of Orginal variable is : $original"; 24 | demo2($original); 25 | echo "
Updated Value of Orginal varaible is : $original"; 26 | 27 | /* Function Returning Values */ 28 | 29 | function findlenghtofstring($name){ 30 | return strlen($name); 31 | } 32 | $data="Vijay"; 33 | $length=findlenghtofstring($data); 34 | echo "
Length of $data is : $length"; 35 | 36 | /* Setting Default values to function Parameters */ 37 | function setdefault($num=10){ 38 | return $num; 39 | } 40 | $number=100; 41 | echo "
The value of number variable is :".setdefault($number); 42 | echo "
The Default value of number variable is :".setdefault();; 43 | 44 | 45 | /* Dynamic Function Calls */ 46 | function test(){ 47 | echo "
testing Function ."; 48 | } 49 | $x="test"; 50 | $x(); 51 | ?> -------------------------------------------------------------------------------- /phppro/p34.php: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | Setting Cookies with PHP 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /phppro/p35.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Accessing Cookies with PHP 5 | 6 | 7 | 8 | 9 | "; 11 | 12 | /* is equivalent to */ 13 | // echo $HTTP_COOKIE_VARS["name"]. "
"; 14 | 15 | echo $_COOKIE["age"] . "
"; 16 | 17 | /* is equivalent to */ 18 | // echo $HTTP_COOKIE_VARS["name"] . "
"; 19 | ?> 20 | 21 | 22 | -------------------------------------------------------------------------------- /phppro/p36.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 17 | Setting up a PHP session 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /phppro/p37.php: -------------------------------------------------------------------------------- 1 | improved) 8 | 2) PDO(PHP Data Objects) 9 | 10 | PDO will work on 12 different Database systems 11 | Mysqli will work only with MYSQL Database 12 | 13 | 14 | In project if you want to switch project from one DB to another Database : 15 | In PDO only Connection 16 | String is need to modify with few queries . With MYSQLi need to rewrite entire code 17 | */ 18 | 19 | 20 | /* Connecting Database */ 21 | 22 | /* Using Mysqli */ 23 | $servername="localhost"; 24 | $username="root"; 25 | $password=""; 26 | 27 | $con=new mysqli($servername,$username,$password); 28 | if($con->connect_error){ 29 | die("Connection Error"); 30 | }else{ 31 | echo " Connection Successful"; 32 | } 33 | 34 | 35 | /* PDO */ 36 | try 37 | { 38 | $database="mydb"; 39 | $connection=new PDO("mysql:host=$servername;dbname=$database",$username,$password); 40 | $connection->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); 41 | echo "Connection Successful"; 42 | } 43 | catch(PDOException $e){ 44 | echo "Connection Failed : $e"; 45 | } 46 | ?> 47 | -------------------------------------------------------------------------------- /phppro/p38.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | prepare($sql); 20 | $stmt->execute(); 21 | while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ 22 | echo ""; 23 | echo ""; 24 | echo ""; 25 | echo ""; 26 | } 27 | ?> 28 | 29 | 30 |
SL.NoName EmailPhone No
".$row['id']."".$row['name']."".$row['email']."".$row['phone']."
31 |
32 |
33 |
-------------------------------------------------------------------------------- /phppro/p39.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | prepare($sql); 20 | $stmt->execute(); 21 | while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ 22 | echo ""; 23 | echo ""; 24 | echo ""; 25 | echo ""; 26 | 27 | } 28 | ?> 29 | 30 | 31 |
Employee IDEmployee Name Employee Salary
".$row['id']."".$row['name']."".$row['salary']."
32 |
33 |
34 |
-------------------------------------------------------------------------------- /phppro/p4.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p41.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/p42.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | prepare($sql); 23 | $stmt->execute(); 24 | $no=1; 25 | while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ 26 | echo ""; 27 | echo ""; 28 | echo ""; 29 | echo ""; 30 | echo ""; 31 | echo ""; 32 | echo ""; 34 | echo ""; 35 | $no++; 36 | } 37 | ?> 38 | 39 |
Sl.NoFirst NameLast Name Email Contact NoGenderAction
".$no."".$row['fname']."".$row['lname']."".$row['email']."".$row['phone']."".$row['gender']."Delete 33 | Update
40 |
41 |
42 |
43 | 44 | prepare($sql); 50 | $stmt->bindParam(1,$_GET['delete_id']); 51 | if($stmt->execute()){ 52 | echo ""; 53 | 54 | }else{ 55 | echo ""; 56 | } 57 | } 58 | 59 | 60 | ?> -------------------------------------------------------------------------------- /phppro/p5.php: -------------------------------------------------------------------------------- 1 | $s is no value at '.__LINE__. 'of '.__FILE__; 20 | } 21 | ?> -------------------------------------------------------------------------------- /phppro/p6.php: -------------------------------------------------------------------------------- 1 | >= Left to right 10 | Equality == != Left to right 11 | Logical AND && Left to right 12 | Logical OR || Left to right 13 | Conditional ?: Right to left 14 | Assignment = += -= *= /= %= Right to left */ 15 | 16 | 17 | $a=10; 18 | echo $a++.'
'; 19 | echo ++$a.'
'; 20 | 21 | $b=23; 22 | echo --$b.'
'; 23 | echo $b--.'
'; 24 | echo $b.'
'; 25 | 26 | $c=10; 27 | echo ($c*12).'
'; 28 | 29 | $d=21; 30 | echo $d/$c .'
'; 31 | 32 | $e=100; 33 | echo $d%$e; 34 | ?> -------------------------------------------------------------------------------- /phppro/p7.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 |
8 | 9 | 18) 15 | { 16 | echo "

Eligible for Vote

"; 17 | } 18 | else{ 19 | echo "

Not Eligible for Vote

"; 20 | } 21 | } 22 | ?> -------------------------------------------------------------------------------- /phppro/p8.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Have a Happy Weekend ..!"; 9 | } 10 | else{ 11 | echo "

Have a Nice Day

"; 12 | } 13 | ?> -------------------------------------------------------------------------------- /phppro/p9.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 |
10 |
11 | 12 | 13 |
14 |
15 |
16 |
17 |
18 | 19 | =95){ 23 | echo ""; 24 | }else if($per>=85 && $per <95){ 25 | echo ""; 26 | }else if($per>=70 && $per <85){ 27 | echo ""; 28 | }else if($per>=60 && $per <70){ 29 | echo ""; 30 | }else if($per>=35 && $per <60){ 31 | echo ""; 32 | }else if($per<35){ 33 | echo ""; 34 | } 35 | } 36 | ?> 37 |
38 |
39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /phppro/php_constant.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phppro/sm.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |
6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 |
14 |
15 | 16 | 22 |
23 |
24 | 25 | 26 |
27 | 28 |
29 | 30 | 32 |
33 |
34 |
35 | 36 |
37 | 38 |
39 | Submitted Details
Name: ".$_POST['fname']."
Email : ".$to."
Subject:".$subject."
Message: ".$message."
"; 48 | $result=mail($to,$subject,$msg,$header); 49 | if($result){ 50 | echo"Mail Send Successfully"; 51 | } 52 | else{ 53 | echo"Mail Not Sent ..!!"; 54 | } 55 | } 56 | ?> -------------------------------------------------------------------------------- /phppro/t1.php: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /sendsms/sendsms.php: -------------------------------------------------------------------------------- 1 | "http://api.msg91.com/api/v2/sendsms?campaign=&response=&afterminutes=&schtime=&unicode=&flash=&message=&encrypt=&authkey=&mobiles=&route=&sender=&country=91", 12 | CURLOPT_RETURNTRANSFER => true, 13 | CURLOPT_ENCODING => "", 14 | CURLOPT_MAXREDIRS => 10, 15 | CURLOPT_TIMEOUT => 30, 16 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 17 | CURLOPT_CUSTOMREQUEST => "POST", 18 | CURLOPT_POSTFIELDS => "{ \"sender\": \"KEONIC\", \"route\": \"4\", \"country\": \"91\", \"sms\": [ { \"message\": \"$message\", \"to\": [ \"$phone\" ] } ] }", 19 | CURLOPT_SSL_VERIFYHOST => 0, 20 | CURLOPT_SSL_VERIFYPEER => 0, 21 | CURLOPT_HTTPHEADER => array( 22 | "authkey: 186843AaiqXTfRqgE5b6ba8ab", 23 | "content-type: application/json" 24 | ), 25 | )); 26 | 27 | $response = curl_exec($curl); 28 | $err = curl_error($curl); 29 | 30 | curl_close($curl); 31 | 32 | if ($err) { 33 | echo "cURL Error #:" . $err; 34 | } else { 35 | echo "Message Sent"; 36 | } 37 | } -------------------------------------------------------------------------------- /sendsms/sms1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Send SMS 5 | 14 | 15 | 16 |
17 | 18 | 19 | 20 |
21 | 22 | -------------------------------------------------------------------------------- /sm1.php: -------------------------------------------------------------------------------- 1 | SMTPDebug = 3; // Enable verbose debug output 8 | 9 | $mail->isSMTP(); // Set mailer to use SMTP 10 | $mail->Host = "smtp.gmail.com"; // specify main and backup server 11 | $mail->SMTPAuth = true; // turn on SMTP authentication 12 | $mail->Username = "emailprojects2017"; // SMTP username 13 | $mail->Password = "emailproject@2017"; // SMTP password 14 | $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted 15 | $mail->Port = 587; // TCP port to connect to 16 | 17 | $mail->setFrom('vijay@ampwork.com', 'Vijay'); 18 | $mail->addAddress('rushab356@gmail.com', 'Rishab'); // Add a recipient 19 | //$mail->addAddress('ellen@example.com'); // Name is optional 20 | //$mail->addReplyTo('info@example.com', 'Information'); 21 | //$mail->addCC('cc@example.com'); 22 | //$mail->addBCC('bcc@example.com'); 23 | 24 | 25 | 26 | //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments 27 | //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name 28 | $mail->isHTML(true); // Set email format to HTML 29 | 30 | $mail->Subject = "This is Testing Email"; 31 | $mail->Body = "Please Ignore this email, it was sent for testing purpose"; 32 | $mail->AltBody = "Please Ignore this email, it was sent for testing purpose"; 33 | 34 | if(!$mail->send()) { 35 | echo 'Message could not be sent.'; 36 | echo 'Mailer Error: ' . $mail->ErrorInfo; 37 | } else { 38 | echo 'Message has been sent'; 39 | } 40 | 41 | 42 | 43 | 44 | 45 | 46 | ?> -------------------------------------------------------------------------------- /type1/config1.php: -------------------------------------------------------------------------------- 1 | connect_error){ 10 | die("connetion failed: ".$con->connet_error); 11 | } 12 | ?> -------------------------------------------------------------------------------- /type1/delete1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Student Information 6 | 7 | 8 |
9 | 10 | 11 | 12 | Cancel 13 |
14 | query($deleteQuery)){ 18 | echo "Record Deleted Successfully"; 19 | header( "refresh:3;url=view1.php" ); 20 | }else{ 21 | echo "Error Deleting Record : ".$con->error; 22 | } 23 | } 24 | ?> 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /type1/insert1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Student Information 6 | 15 | 16 | 17 |
18 |
19 |

Student Registration

20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | query($selectQuery); 31 | $count=$stmt->num_rows; 32 | if($count>0){ 33 | echo "Username Already In Use."; 34 | }else{ 35 | $insertQuery="INSERT INTO student SET name='".$_POST['name']."', email='".$_POST['email']."', phone='".$_POST['phone']."', username='".$_POST['username']."', password='".$_POST['password']."'"; 36 | if($con->query($insertQuery)){ 37 | echo "Record Inserted Successfully"; 38 | }else{ 39 | echo $con->error; 40 | } 41 | } 42 | } 43 | $con->close(); 44 | ?> 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /type1/view1.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | View Students 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | query($selectQuery); 26 | if($stmt->num_rows > 0){ 27 | $no=1; 28 | while($row=$stmt->fetch_assoc()) { 29 | ?> 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | close(); 51 | ?> 52 | 53 | 54 |
Sl.NoNameEmailPhoneUsernamePasswordUpdateDelete
UpdateDelete
No Record Found
55 | 56 | -------------------------------------------------------------------------------- /type2/config2.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type2/delete2.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Student Information 6 | 7 | 8 |
9 | 10 | 11 | 12 | Cancel 13 | 14 |
15 | error; 23 | } 24 | } 25 | ?> 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /type2/insert2.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Student Information 6 | 15 | 16 | 17 |
18 |
19 |

Student Registration

20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 0){ 33 | echo "Username Already In Use."; 34 | }else{ 35 | $insertQuery="INSERT INTO student SET name='".$_POST['name']."', email='".$_POST['email']."', phone='".$_POST['phone']."', username='".$_POST['username']."', password='".$_POST['password']."'"; 36 | if(mysqli_query($con,$insertQuery)){ 37 | echo "Record Inserted Successfully"; 38 | }else{ 39 | echo mysqli_error($con); 40 | } 41 | } 42 | } 43 | mysqli_close($con); 44 | ?> 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /type2/view2.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | View Students 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 0) 28 | { 29 | $no=1; 30 | while($row = mysqli_fetch_assoc($stmt)){ 31 | ?> 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 48 | 49 | 50 | 51 | 55 | 56 |
Sl.NoNameEmailPhoneUsernamePasswordUpdate Delete
UpdateDelete
No Record Found
57 | 58 | -------------------------------------------------------------------------------- /type3/config3.php: -------------------------------------------------------------------------------- 1 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 11 | 12 | }catch(PDOException $ex){ 13 | echo "Connection Failed : ".$ex->getMessage(); 14 | } 15 | ?> -------------------------------------------------------------------------------- /type3/delete3.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Student Information 6 | 7 | 8 |
9 | 10 | 11 | 12 | Cancel 13 | 14 |
15 | query($deleteQuery)){ 19 | echo "Record Deleted Successfully"; 20 | header( "refresh:3;url=view3.php" ); 21 | }else{ 22 | echo "Error Deleting Record : ".$con->error; 23 | } 24 | } 25 | ?> 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /type3/insert3.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Student Information 6 | 15 | 16 | 17 |
18 |
19 |

Student Registration

20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | query($selectQuery); 31 | $count=$stmt->rowCount(); 32 | if($count>0){ 33 | echo "Username Already In Use."; 34 | }else{ 35 | try{ 36 | $insertQuery="INSERT INTO student SET name='".$_POST['name']."', email='".$_POST['email']."', phone='".$_POST['phone']."', username='".$_POST['username']."', password='".$_POST['password']."'"; 37 | $con->exec($insertQuery); 38 | echo "Record Inserted Successfully"; 39 | }catch(PDOException $ex){ 40 | echo "$insertQuery
".$ex->getMessage(); 41 | } 42 | } 43 | } 44 | ?> 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /type3/view3.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | View Students 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | query($selectQuery); 25 | $count=$stmt->rowCount(); 26 | if($count > 0) 27 | { 28 | $no=1; 29 | while($row = $stmt->fetch(PDO::FETCH_ASSOC)){ 30 | ?> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 48 | 49 | 50 | 51 | 55 | 56 |
Sl.NoNameEmailPhoneUsernamePasswordUpdate Delete
UpdateDelete
No Record Found
57 | 58 | -------------------------------------------------------------------------------- /type4/1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Demo Page 5 | 36 | 37 | 38 | 39 |

Kenoics

40 | 41 | 42 | 43 | 46 | 51 | 52 | 53 |
44 | 45 | 47 |

School : XYZ Pvt School

48 |

College : ABC Govt. College

49 |

Hobbies : Cricket, Footbal ......

50 |
54 |
55 |

About Me :

56 |

57 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam non pellentesque purus. Quisque aliquet tellus id odio lacinia, condimentum commodo turpis tempus. Pellentesque quis metus vitae tortor venenatis tincidunt. Donec maximus, libero nec accumsan hendrerit, ex massa volutpat eros, at euismod purus orci at lorem. 58 |

59 |
60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /type4/2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | User Registration Form 5 | 42 | 43 | 44 |

User Registration

45 |
46 | 47 | 48 |
49 | 50 | 51 |
52 | 53 | 54 |
55 | 56 | 57 |
58 | 59 | 60 |
61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /type4/3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | User Login 5 | 43 | 44 | 45 |

User Login

46 |
47 | 48 | 49 |
50 | 51 | 52 |
53 | 54 |
55 | 56 | -------------------------------------------------------------------------------- /type4/4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Contact Us 5 | 43 | 44 | 45 | 46 |

Contact Us

47 |
48 | 49 | 50 |
51 | 52 | 53 | 54 |
55 | 56 | 57 |
58 | 59 | 60 |
61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /type4/config.php: -------------------------------------------------------------------------------- 1 | setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); 9 | }catch(PDOException $ex){ 10 | echo "Connection Error :".$ex->getMessage(); 11 | } 12 | ?> -------------------------------------------------------------------------------- /type4/db1.php: -------------------------------------------------------------------------------- 1 | connect_error){ 11 | echo "Connection Failed"; 12 | }else{ 13 | echo "Connection Successful"; 14 | } 15 | 16 | /*Procedural*/ 17 | $con=mysqli_connect($servername,$username,$password,$dbname); 18 | if(!$con){ 19 | echo "Connection Failed"; 20 | }else{ 21 | echo "Connection Successful"; 22 | } 23 | 24 | /*PDO*/ 25 | try{ 26 | $con=new PDO("mysql:host=$servername;database=$dbname",$username,$password); 27 | $con->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); 28 | 29 | echo "Connection Successful"; 30 | }catch(PDOException $ex){ 31 | echo "Connection Failed".$ex->getMessage(); 32 | } 33 | 34 | ?> -------------------------------------------------------------------------------- /type4/delete.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Record Delete 6 | 7 | 8 | 12 |
13 | 14 | 15 | Cancel 16 |
17 | Click here to go back"; 20 | } 21 | ?> 22 | 23 | 24 | 25 | query($deleteQuery); 30 | echo "Record is Deleted. Click here to go"; 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /type4/demo1.php: -------------------------------------------------------------------------------- 1 | 4 | 7 | -------------------------------------------------------------------------------- /type4/display.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Display User Table 6 | 7 | 8 |
User Table
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | SELECT * FROM user WHERE name LIKE '%e%' -- letter 'e' in the name 26 | >SELECT * FROM user WHERE name LIKE 'e%' --letter begin with 'e' 27 | >SELECT * FROM user WHERE name LIKE '%e' --letter end with 'e' 28 | >SELECT * FROM user WHERE gender='male' --Filter the table by gender is male 29 | 30 | */ 31 | $selectQuery="SELECT * FROM user ORDER BY uid DESC"; 32 | $stmt=$con->query($selectQuery); 33 | $no=1; 34 | while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ 35 | ?> 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 48 | 49 | 53 | 54 |
SL.NoNameEmailPhoneDobGenderReg.DateAction
45 | Update 46 | Delete 47 |
55 | 56 | -------------------------------------------------------------------------------- /type4/fileRead.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Reading Image file from Database 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | query($selectQuery); 22 | $no=1; 23 | while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ 24 | ?> 25 | 26 | 27 | 30 | 31 | 32 | 36 | 37 |
Sl.NoFile LocationReg.Date
28 | <?=$row['file_location']?> 29 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /type4/fileUpload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | File Upload 5 | 6 | 7 |
8 |

File Upload

9 |
10 |
11 | 12 | 13 | 14 |

15 | 16 |
17 | 18 | 19 | prepare($insertQuery); 37 | $stmt->bindParam(1,$path); 38 | $stmt->execute(); 39 | echo "File is Uploaded"; 40 | }else{ 41 | echo "Invalid File Format"; 42 | } 43 | }else{ 44 | echo "File Not Selected"; 45 | } 46 | } 47 | ?> -------------------------------------------------------------------------------- /type4/insert.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Insert User INformation 5 | 6 | 7 |
8 | 9 | 10 |

11 | 12 | 13 |

14 | 15 | 16 |

17 | 18 | 19 |

20 | 21 | 22 |
23 | 24 | 25 | query($selectQuery); 30 | $count=$stmt->rowCount(); 31 | if($count>0){ 32 | echo " User is already used email and phone number"; 33 | }else{ 34 | $insertQuery="INSERT INTO user SET name=?,email=?,phone=?,dob=?"; 35 | $stmt1=$con->prepare($insertQuery); 36 | $stmt1->bindParam(1,$_POST['user_name']); 37 | $stmt1->bindParam(2,$_POST['user_email']); 38 | $stmt1->bindParam(3,$_POST['user_phone']); 39 | $stmt1->bindParam(4,$_POST['user_dob']); 40 | $stmt1->execute(); 41 | echo "User Registered Successful.!"; 42 | } 43 | } 44 | 45 | ?> -------------------------------------------------------------------------------- /type4/login_process.php: -------------------------------------------------------------------------------- 1 | 5){ 4 | header("location:p25.php?msg=Exceed the login limit."); 5 | exit(); 6 | }else{ 7 | $_SESSION['counter']++; 8 | if((isset($_POST['username'])) && (isset($_POST['password']))){ 9 | if(($_POST['username']==='admin') && ($_POST['password']==='123456')){ 10 | header("location:welcome.php?username=".$_POST['username']); 11 | }else{ 12 | header("location:p25.php?msg=invalid credentials"); 13 | } 14 | } 15 | } 16 | 17 | 18 | ?> -------------------------------------------------------------------------------- /type4/p1.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p10.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p11.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p12.php: -------------------------------------------------------------------------------- 1 | "; 10 | } 11 | 12 | /*18 * 1 = 18 13 | . 14 | . 15 | 18 * 10 =180*/ 16 | ?> -------------------------------------------------------------------------------- /type4/p13.php: -------------------------------------------------------------------------------- 1 | "; 16 | $i++; 17 | } 18 | 19 | ?> -------------------------------------------------------------------------------- /type4/p14.php: -------------------------------------------------------------------------------- 1 | "; 18 | $i++; 19 | }while($i<=10); 20 | 21 | ?> -------------------------------------------------------------------------------- /type4/p15.php: -------------------------------------------------------------------------------- 1 | "; 5 | } 6 | 7 | ?> -------------------------------------------------------------------------------- /type4/p16.php: -------------------------------------------------------------------------------- 1 | 7 | 1){ 10 | $j=1; 11 | while($j<$i){ 12 | echo "* "; 13 | $j++; 14 | } 15 | echo "
"; 16 | $i--; 17 | } 18 | ?> 19 | -------------------------------------------------------------------------------- /type4/p17.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p18.php: -------------------------------------------------------------------------------- 1 | "Apple", 6 | "product2"=>"T-shirt", 7 | "product3"=>"Jeans" 8 | ); 9 | print_r($object); 10 | echo "$object[product1]"; 11 | 12 | ?> -------------------------------------------------------------------------------- /type4/p19.php: -------------------------------------------------------------------------------- 1 | array("chess","tt","lodo"), 5 | "outdoor"=>array("football","tennis","hockey") 6 | ); 7 | print_r($games); 8 | echo "
"; 9 | print_r($games["indoor"]); 10 | echo "
"; 11 | print_r($games["outdoor"]); 12 | echo "
"; 13 | print_r($games["indoor"][1]); 14 | echo "
"; 15 | print_r($games["outdoor"][2]); 16 | echo "
"; 17 | print_r($games["indoor"][0]); 18 | ?> -------------------------------------------------------------------------------- /type4/p2.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p20.php: -------------------------------------------------------------------------------- 1 | "; 8 | } 9 | 10 | 11 | ?> -------------------------------------------------------------------------------- /type4/p21.php: -------------------------------------------------------------------------------- 1 | "Apple", 6 | "product2"=>"T-shirt", 7 | "product3"=>"Jeans", 8 | "product4"=>"Computers" 9 | ); 10 | foreach ($object as $key=>$values) { 11 | echo "Position $key and its value is : $values
"; 12 | } 13 | //Array Functions 14 | /* 15 | 1. Count 16 | 2. implode 17 | 3. asort 18 | 4. shuffle 19 | */ 20 | echo count($object); 21 | 22 | $result=implode( "
", $object); 23 | echo "
$result"; 24 | 25 | asort($object); 26 | $output=implode("
", $object); 27 | echo "
Example of Asort Function
$output"; 28 | 29 | shuffle($object); 30 | $output=implode("
", $object); 31 | echo "
Example of Shuffle Function
$output"; 32 | 33 | ?> -------------------------------------------------------------------------------- /type4/p22.php: -------------------------------------------------------------------------------- 1 | "Apple", 5 | "product2"=>"T-shirt", 6 | "product3"=>"Jeans", 7 | "product4"=>"Computers" 8 | ); 9 | $search="Computers"; 10 | $status=""; 11 | foreach ($object as $key => $value) { 12 | 13 | if($value===$search){ 14 | $status="$search Found at the Position $key"; 15 | break; 16 | }else{ 17 | $status= "Element Not Found"; 18 | } 19 | } 20 | echo "$status"; 21 | ?> 22 | -------------------------------------------------------------------------------- /type4/p23.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Request and Response 6 | 7 | 8 |
9 | 10 | 11 |
12 | 13 |
14 | "; 19 | } 20 | } 21 | ?> 22 | 23 | -------------------------------------------------------------------------------- /type4/p24.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Request and Response 6 | 7 | 8 |
9 | 10 | 11 |
12 | 13 |
14 | "; 19 | } 20 | } 21 | ?> 22 | 23 | -------------------------------------------------------------------------------- /type4/p25.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | Login Page 16 | 17 | 18 |
19 |

Login Page

20 |
21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |

29 | 30 | 31 |
32 | 37 | 38 | -------------------------------------------------------------------------------- /type4/p26.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p27.php: -------------------------------------------------------------------------------- 1 | $my_cont"; 6 | echo "
$pi"; 7 | 8 | ?> -------------------------------------------------------------------------------- /type4/p28.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p29.php: -------------------------------------------------------------------------------- 1 | CRUD 2 | C - Create 3 | R - Read 4 | U - Update 5 | D - Delete 6 | 7 | create table demo( 8 | id INT , 9 | col1 varchar(255) 10 | ) 11 | 12 | INSERT INTO `student` (`std_id`, `std_name`, `std_email`, `std_phone`, `std_address`, `std_reg_date`) VALUES (NULL, 'Vijay', 'vijay@ampwork.com', '1234567890', 'dont know', CURRENT_TIMESTAMP); 13 | 14 | UPDATE `student` SET `std_name` = 'vijay t' WHERE `student`.`std_id` = 1; 15 | 16 | DELETE FROM `student` WHERE `student`.`std_id` = 1 -------------------------------------------------------------------------------- /type4/p3.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p4.php: -------------------------------------------------------------------------------- 1 | "; 4 | echo "$num1 * 2 =".($num1*2)."
"; 5 | echo "$num1 * 3 =".($num1*3)."
"; 6 | ?> -------------------------------------------------------------------------------- /type4/p5.php: -------------------------------------------------------------------------------- 1 | 18){ 6 | echo "Eligible for Voting"; 7 | } 8 | 9 | ?> -------------------------------------------------------------------------------- /type4/p6.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /type4/p7.php: -------------------------------------------------------------------------------- 1 | 60){ 20 | echo "Scored First Class"; 21 | }else{ 22 | if($percentage>50){ 23 | echo "Scored Second Class"; 24 | }else{ 25 | if($percentage>35){ 26 | echo "Scored Pass Class"; 27 | }else{ 28 | echo "Failed"; 29 | } 30 | } 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /type4/p8.php: -------------------------------------------------------------------------------- 1 | =21){ 4 | echo "Eligible for Voting and Marriage"; 5 | }else{ 6 | if($age>=18){ 7 | echo "Eligible for Voting But Not Marriage"; 8 | }else{ 9 | echo "Not Eligible for Voting"; 10 | } 11 | } 12 | 13 | /* 14 | >= // Greater than Equal to 15 | <= // Lesser than Equal to 16 | == // Equals 17 | */ 18 | ?> -------------------------------------------------------------------------------- /type4/p9.php: -------------------------------------------------------------------------------- 1 | $date"; 8 | 9 | $month=date('m'); 10 | echo "
$month"; 11 | 12 | $year=date('y'); 13 | echo "
$year"; 14 | ?> 15 | -------------------------------------------------------------------------------- /type4/welcome.php: -------------------------------------------------------------------------------- 1 | go Back"; 6 | } 7 | 8 | ?> -------------------------------------------------------------------------------- /webdesign_assign/Hoverable Dropdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 | 42 | 43 | 44 |

Hoverable Dropdown

45 |

Move the mouse over the button to open the dropdown menu.

46 | 47 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /webdesign_assign/Hoverable Dropdown.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 | 42 | 43 | 44 |

Hoverable Dropdown

45 |

Move the mouse over the button to open the dropdown menu.

46 | 47 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /webdesign_assign/side navigation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 49 | 50 | 51 | 52 |
53 | × 54 | About 55 | Services 56 | Clients 57 | Contact 58 |
59 | 60 |

Animated Sidenav Example

61 |

Click on the element below to open the side navigation menu.

62 | ☰ open 63 | 64 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /webdesign_assign/side navigation.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 49 | 50 | 51 | 52 |
53 | × 54 | About 55 | Services 56 | Clients 57 | Contact 58 |
59 | 60 |

Animated Sidenav Example

61 |

Click on the element below to open the side navigation menu.

62 | ☰ open 63 | 64 | 73 | 74 | 75 | --------------------------------------------------------------------------------