You are to create a Web site that utilizes file handling. You may choose your own topic if you wish.
If you wish, this project may also contiue working on your ATM project. Create pages that allow the user to request a bank statement. You must have a beginning balance, each transaction, with the balance after each transaction, and an ending balance.
I had hoped to be able to add an example for emailing but ACC has blocked all email from our server. I'm trying to get it approved. However, many students request an example so they can use the mail on their own servers. The following example is provided as an FYI.
Here is an example of a form that sends data to a php page and sends the form information to both the pet registry (my email) and to the person completing the form. You must complete the email text box with your own email address to receive the mail. Warning: If the To: field and the CC: field are the same, you will only receive one email message. If you use 2 different email addresses for To: and CC:, 2 messages will be sent.
Please, do not test using my email address. Use your own.
Here is the php code used to process the form and send an email:
<?php
$petOwner = $_POST['petOwner'];
$email = $_POST['email'];
$to = "jscholl@austincc.edu";
$cc = "$email";
$subject = "Pet Registry " . $petOwner;
$header = "From: $email\n";
$header .= "Cc: $cc\n";
$address = $_POST['address'];
$phone = $_POST['phone'];
$description = $_POST['description'];
$special = $_POST['special'];
$whatToDo = $_POST['whatToDo'];
$body = "Pet Owner: $petOwner \r\n\r\n";
$body .= "Address: $address \r\n\r\n";
$body .= "Phone: $phone \r\n\r\n";
$body .= "Description: $description \r\n\r\n";
$body .= "Special: $special \r\n\r\n";
$body .= "What to do: $whatToDo \r\n\r\n";
$body = wordwrap($body,70);
if (mail($to, $subject, $body, $header))
{
echo("<p>Message successfully sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>
If any of these steps have errors let me know through email so that I can make the correction