Friday, February 25, 2011

Friday, August 25th 2011


<?php

//create short variable names
$name = $_POST['name'];
$email = $_POST['email'];
$feedback = $_POST['feedback'];

//set up some static information
$toaddress = "alfred.jensen@laservault.com";
$subject = "Feedback from web site";

$mailcontent = "Customer name: " . $name . "\n" .
"Customer email: " . $email . "\n" .
"Customer comments: \n" . $feedback . "\n";

$fromaddress = "From: alfred.jensen@laservault.com";
//invoke mail() function to send mail
mail($toaddress, $subject, $mailcontent, $fromaddress);

?>
<html>
<head>
<title>Bob's Auto Parts - Feedback Submitted</title>
</head>
<body>
<h1>Feedback submitted</h1>
<p>Your feedback has been sent.</p>
</body>
</html>



Here is another tutorial which I modified to make the construction of the submenu based on an array rather than doing it by hand.


<head>
<title>TLA Consulting Pty Ltd</title>
<style type = "text/css">

h1 {color:white; font-size:24pt; text-align:center; font-family:arial,sans-serif;}

.menu {color:white; font-size:12pt; text-align:center; font-family:arial, sans-serif; font-weight:bold;}

td {background:black;}

p {color:black; font-size:12pt; text-align:justify; font-family:arial, sans-serif}

p.foot {color:white; font-size:9pt; text-align:center; font-family:arial, sans-serif; font-weight:bold;}

a:link, a:visited, a:active {color:white}

</style>

</head>

<body>

<table width="100%" cellpadding="12" cellspacing="0" border="0">
<tr bgcolor="black">
<td align="left"><img src="logo.gif" alt="TLA logo" height="70" width="70"></td>
<td>
<h1>TLA Consulting</h1>
</td>
<td align="right"><img src ="logo.gif" alt="TLA logo" height="70" width="70" /></td>
</tr>
</table>
<!-- menu -->
<table width = "100%" bgcolor="white" cellpaddinng="4" cellspacing="4">
<tr>
<?php
$menuItems=array("Home","Contact","Services","Site Map");
$divider = count($menuItems);
$percentage = (100/$divider) . "%";
for ($i=0; $i<=$divider; $i++) {
?>
<td width="">;
<span class="menu"></span>
</td>
<?php } ?>
</tr>
</table>

No comments: