Transcript Chapter 1

Web
Design
Notes
Fred Durao
[email protected]
Handy Hints
Web Designing is a cocktail of creative skills & technical prowess - and one
is no less important than the other.









A picture, they say, is worth a thousand words.
Navigability & functionality come before artistic excellence.
User separate files when possible.
Ask friends to assess your own work.
Make your pages intuitively and navigational.
Avoid plenty of animated gifs.
Use intuitive labels for buttons.
Avoid using BIG font size and IMPACT font styles. Some times, it is unreadable.
Improvise on top of high quality templates.
and.. very importantly
 Always comment your code.
Commenting your code
 4 main reasons:
 Hide information;
 Code becomes inactive;
 Explain what is going on the code;
 Easy maintainability;
 HTML
<!--
<td align="right">
 CSS
/* menu settings*/
#menu {
width: 920px;
}
-->
Commenting your code
 JavaScript
//document.write("You can't see this!");
/*document.write("You can't see this!");*/
 PHP
// php email command
@mail($email_to, $email_subject, $email_message, $headers);
PHP email command
 The PHP email command is defined as:
@mail($email_to, $email_subject, $email_message, $headers);
$email_to = "[email protected]”;
$email_from = “[email protected]";
$email_subject = “Lecture Notes";
$email_message = “Hi I just want to say hi”;
$headers = 'From: '.$email_from.'Reply-To: '.$email_from.";
PHP email command (2)
Let’s extend your message from HTML input text values
1 - $email_message = “Hi I just want to say hi”;
2 -$_POST[‘cpr']: This command gets the cpr value from your html input text
field whose name property is “cpr” , i.e. <input name=“cpr" text" size="30“>
$cpr = $_POST['cpr'];
3 - $email_message .= $cpr
Or
$email_message = $email_message . $cpr
4 – Then it will print: “Hi I just want to say hi 1710813015”;
* Assuming that you have typed 1710813015 as your CPR number in you html input text
field.