10 PHP Email (Day 10)
-
Upload
geshan-manandhar -
Category
Documents
-
view
222 -
download
0
Transcript of 10 PHP Email (Day 10)
-
8/14/2019 10 PHP Email (Day 10)
1/12
GeshanManandhar.comGeshanManandhar.com 11
PHP Day 10PHP Day 10
Geshan ManandharGeshan ManandharDeveloper,Developer,
Young Innovations Private LimitedYoung Innovations Private Limited
www.geshanmanandhar.comwww.geshanmanandhar.com
http://www.php.nethttp://www.mysql.com
http://www.php.net/http://www.mysql.com/http://www.mysql.com/http://www.php.net/ -
8/14/2019 10 PHP Email (Day 10)
2/12
GeshanManandhar.com 2
Email with PHPEmail with PHP
?>
-
8/14/2019 10 PHP Email (Day 10)
3/12
GeshanManandhar.com 3
Use of EmailsUse of Emails
Emails are used as an alert system inEmails are used as an alert system indatabase focused application.database focused application.
It is sent to notify application userIt is sent to notify application user
about various activities.about various activities.Applications like e-card system relyApplications like e-card system rely
heavily on email.heavily on email.
Server configuration, no. or emailsServer configuration, no. or emailsallowed etc are also vital inallowed etc are also vital inapplications that use e-mail.applications that use e-mail.
-
8/14/2019 10 PHP Email (Day 10)
4/12
-
8/14/2019 10 PHP Email (Day 10)
5/12
GeshanManandhar.com 5
Back to basics C style printfBack to basics C style printf
if($odd){if($odd){
printf ("%d is odd.", $number);printf ("%d is odd.", $number);
}}else {else {
printf ("%d is even.", $number);printf ("%d is even.", $number);
}}?>?>
-
8/14/2019 10 PHP Email (Day 10)
6/12
GeshanManandhar.com 6
Back to the basics - TernaryBack to the basics - Ternary
Ternary operatorTernary operator
?>
-
8/14/2019 10 PHP Email (Day 10)
7/12
GeshanManandhar.com 7
Better programming mantrasBetter programming mantras
UseUseTernaryTernary Operator to save time and LOC-Operator to save time and LOC-Lines of code.Lines of code.
UtilizeUtilize arrayarray and array related functions toand array related functions to
the maximum.the maximum. Implement DRY in coding.Implement DRY in coding.
Instead of creating multiple functions justInstead of creating multiple functions just add aadd aparameterparameter to existing function to do the job.to existing function to do the job.
UseUse debuggingdebugging techniquestechniques Use functions like print, echo, print_r, var_dumpUse functions like print, echo, print_r, var_dump
at relevant breakpoints to check the value of theat relevant breakpoints to check the value of thevariable.variable.
-
8/14/2019 10 PHP Email (Day 10)
8/12
GeshanManandhar.com 8
If you have no web templateIf you have no web template
If you layout looks too dull and youIf you layout looks too dull and youcant design or dont want to design.cant design or dont want to design.
Then try out these websites to get freeThen try out these websites to get free
web templates:web templates: http://www.opendesigns.org/http://www.opendesigns.org/ http://www.freecsstemplates.org/http://www.freecsstemplates.org/
http://www.freewebsitetemplates.com/http://www.freewebsitetemplates.com/ More atMore athttp://delicious.com/geshan/WebTemplateshttp://delicious.com/geshan/WebTemplates
http://www.opendesigns.org/http://www.opendesigns.org/http://www.freecsstemplates.org/http://www.freecsstemplates.org/http://www.freewebsitetemplates.com/http://www.freewebsitetemplates.com/http://delicious.com/geshan/WebTemplateshttp://delicious.com/geshan/WebTemplateshttp://delicious.com/geshan/WebTemplateshttp://www.freewebsitetemplates.com/http://www.freecsstemplates.org/http://www.opendesigns.org/ -
8/14/2019 10 PHP Email (Day 10)
9/12
GeshanManandhar.com 9
Simply theme your codeSimply theme your code
Download the template you want.Download the template you want.
See the structure.See the structure.
Change the static content to theChange the static content to thedynamic (PHP) content you want todynamic (PHP) content you want to
replace with.replace with.
Check your output.Check your output.Hit and trail works if you are not goodHit and trail works if you are not good
at designing.at designing.
-
8/14/2019 10 PHP Email (Day 10)
10/12
GeshanManandhar.com 10
A themed users tableA themed users table
-
8/14/2019 10 PHP Email (Day 10)
11/12
GeshanManandhar.com 11
QuestionsQuestions
-
8/14/2019 10 PHP Email (Day 10)
12/12