new to php question on email

the mail() function

Moderators: macek, egami, gesf

pearsam
New php-forum User
New php-forum User
Posts: 15
Joined: Thu Apr 05, 2012 6:51 pm

new to php question on email

Postby pearsam » Fri Apr 27, 2012 7:38 pm

I have currently an Html5, css3 and a php programs. I'm not sure on how to put them together to send and email.

Here is the html code:
<!DOCTYPE html>

<html lang="en" class="no-js">
<head>
<title>View Job</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>


<link rel="stylesheet" href="/styles/innerpages.css" />
<script src="/scripts/modernizr.custom.97732.js" type="text/javascript"></script>
<!--[if lt ie 9]>
<link rel="stylesheet" href="/styles/ie8.css" type="text/css" />
<![endif]-->
<!--[if lt ie 8]>
<link rel="stylesheet" href="/styles/ie7.css" type="text/css" />
<![endif]-->
<!--[if lt ie 7]>
<link rel="stylesheet" href="/styles/ie6.css" type="text/css" />
<![endif]-->
<script src="/scripts/common.js" type="text/javascript"></script>
</head>
<body>
<div id="wrapper">

<div id="main">

<form name="Form1" method="post" id="Form1">
<!--<div>

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTYyOTAzNDM0Nw9kFgICBA9kFhgCAw8PFgIeBFRleHQFD1Byb2dyYW0gQW5hbHlzdGRkAgUPDxYCHwAFCUZ1bGwgVGltZWRkAgcPDxYCHwAFJFRleGFzIFJhbmdlciBIYWxsIG9mIEZhbWUgYW5kIE11c2V1bWRkAgkPDxYCHwAFHSQxLDA1MC4yNyAtICQxLDMzMi45Ny9CaS13a2x5ZGQCCw8PFgIfAAUEODQyOGRkAg0PDxYCHwAFATFkZAIPDw8WAh8ABQpCLiBKb2huc29uZGQCEQ8PFgIfAAUJMy8yMS8yMDEyZGQCEw8PFgIfAGVkZAIVDw8WAh8ABVBNb25kYXktRnJpZGF5LCA4OjAwYW0tNTowMHBtOyBtYXkgYmUgcmVxdWlyZWQgdG8gd29yayB3ZWVrZ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<h2><span id="lblTitle">Program Analyst</span> &#8212; <span id="lblFullOrPart">Full Time</span> &#8212; <span id="lblDepartment">Texas Air Force Museum</span></h2>
<p><b>Hiring Salary: <span id="lblSalary">$1,050.27 - $1,332.97/Bi-wkly</span></b></p>

<p><b>REQ #: <span id="lblREQ">8428</span> &#8212; <span id="lblPositions">1</span> Position(s)</b></p>
<p><b>Supervisor: <span id="lblSupervisor">A. Haynes</span></b></p>
<p><b>Posted Date: <span id="lblPostedDate">4/24/2012</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reposted Date: <span id="lblRepostedDate"></span></b></p>
<p><b>Hours: <span id="lblWeeklyHours">Monday-Friday, 8:00am-5:00pm; may be required to work weekends and
holidays.

</span></b></p>
<p><span id="lblDescription">This position serves as financial officer of the Texas Air Force Museum under the supervision of the Director. The program analyst serves as liaison with Finance, Budget, Purchasing, and other departments/entities as assigned. <br /><br />PRIMARY RESPONSIBILITIES<br /><br />Daily Financial Reconciliation: Reviews, verifies, and resolves daily deposits; and prepares and forwards daily reports to City of Ding Dong Finance Department. Reviews and integrates daily retail sales transactions with the City (H.T.E.) accounting system. Prepares billing and check requests, receives payments, and enters requisitions for purchase orders. Processes travel, training, and reimbursement requests and employee status changes. <br /><br />Biweekly Payroll: Reviews and reconciles biweekly payroll entries, submits to Director for review and approval, forwards to Payroll. <br /><br />Banquet Rentals: Supervises banquet rental operations. Meets with clients, contracts for and reserves space, and reviews set ups with the physical plant manager. <br /><br />Fund Transactions/Analysis: Monitors, processes receipts and disbursements, and reports to the Director on the status of non-operating funds. These include designated donation funds, grant and licensing payments, grant and general construction funds. <br /><br />Retail Sales Cash Flow/Inventory Analysis: In conjunction with the Retail Sales Manager, establishes and monitors inventory expenditure levels versus retail sales revenues and assists in financial analysis and setting procedures as necessary. Cross train in Admissions and RecTrac point-of-sale transaction systems. <br /><br />Annual Budget: Prepares annual budget under the supervision of the Director by analyzing past annual expenditure and revenue levels; projecting and recommending new budgetary levels; implementing and consistently monitoring the approved annual budget; receiving and evaluating new property items and replacement equipment requests; researching and recommending adjustments to the departmental fee schedule as necessary based on market research. <br /><br />Other: Analyzes financial and management information and performs research as requested. Orders supplies and coordinates equipment. Monitors, reviews, and updates museum procedures to ensure compliance with Finance, Purchasing, and Human Resources requirements. Assists Director with preparation for Board meetings and drafts summary meeting notes. Performs other related tasks as assigned. Follows City and departmental policies and procedures. Works in a climate controlled office environment.<br /></span></p>
<p><b>REQUIRED:</b></p>
<blockquote><span id="lblRequirements">Drivers License: Valid Class C Texas DL<br />Education: Bachelor's Degree in Accounting, Business, or a related field is required.<br />Experience: Three years of experience in Public Administration, Accounting, or a related field is required.<br />Certifications: No certifications required.<br />Testing: Business Writing, Financial Math, Microsoft Word 2003 and Excel 2003 normal user with minimum scores of 70% are required.<br />Physical Demands: Light<br /></span></blockquote>


<!--EndNotifyBot-->
</article>

<div class="clear"> </div>
</section>
</form>
</div>


<!--
<script type="text/javascript">
function closeWidget(id){
var widget1=document.getElementById('notifymeform');
var node=document.getElementById(id);
widget1.removeChild(node);
}
</script>

<div id="notifymeform" class="notifymeform">
<div id="notifysignup">
<h1>Notify Me: Sign Up</h1>
<h3>Sign up for our notification list and we'll send you an<br>e-mail when the information on this page is updated!</h3>
<p><b>E-mail Address:</b>&nbsp;<input type="text" id="txtnotifymeemail" /></p>
<p><input type="button" id="btnsignup" value="Signup" onclick="notifymesignup();" /></p>
</div>
</div>-->

</div>


</body>
</html>

and the css code for the html:

/*
#### STYLE SHEET
*/
body {
background-color: #72b2d4;
}
div#wrapper {
background: transparent url(http://images1.waco-texas.com/images/bg-home.jpg) top center no-repeat fixed;
}


section#content { height:auto; font-size: 11px;}
section#content a, section#content a { text-decoration: none; }


/* Generic article style */
section#content article.one {
position: relative;
display: inline-block;
width: 600px;
margin: 16px 0 20px 0px;
text-align: left;
font-size: 12px;
line-height: 1.2em;
}
section#content article.one p { margin: 6px; }
section#content article.one blockquote { margin: 4px 10px; }
section#content article.one h1 { font-size: 2em; margin: 0.5em 0; line-height: 1.2em; }
section#content article.one h2 { font-size: 1.4em; margin: 0.5em 0; line-height: 1.2em; }
section#content article.one h3 { font-size: 1.2em; margin: 0.5em 0; line-height: 1.2em; }


footer { color: #656464; }
footer a:link, footer a:visited { color:#696969; }
footer a:hover { color:#000; }


Here is what I have so far for the form php:

<?php
$name = $_POST["name"];
$address = $_POST["address"];
$city = $_POST["city"];
$state = $_POST["state"];
$zip = $_POST["zip"];
$phone = $_POST["phone"];
$email = $_POST["email"];
$education = $_POST["education"];
$skill = $_POST["skill"];
$accomplishment = $_POST["accomplishment"];
$TofD = $_POST["TofD"];
if (!isset($_POST['submit'])) { // if page is not submitted to itself echo the form
?>
<html>
<head>
<title>Job Posting</title>
</head>
<body>
<h1>
<form id="form1" name="form1" method="post" action="<?php echo $PHP_SELF;?>">
Name:<input type="text" size="30" maxlength="36" name="name"><br />
Street:<input type="text" size="40" maxlength="46" name="address"><br />
City:<input type="text" size="20" maxlength="36" name="city"><br />
State:<input type="text" size="12" maxlength="36" name="state"><br />
Zip code:<input type="text" size="5" maxlength="10" name="zip"><br />
Phone number:<input type="text" size="12" maxlength="36" name="phone"><br />
Email:<input type="text" size="40" maxlength="46" name="email"><br /><br />
Select a Level of Education:<br />
<select name="education">
<option value="Jr.High">Jr.High</option>
<option value="HighSchool">HighSchool</option>
<option value="College">College</option>
<option value="Graduate">Masters</option></select><br /><br />
Typing:<input type="checkbox" value="Typing" name="skills"><br />
Computer:<input type="checkbox" value="Computer" name="skills"><br />
Accounting:<input type="checkbox" value="Accounting" name="skills"><br />
Microsoft Office:<input type="checkbox" value="Office" name="skills"><br /><br />

Accomplishments:<textarea rows="1" cols="60" name="accomplishment" wrap="physical">Enter your Accomplishments here!</textarea><br /><br />

What time of day may we call:<br />
<select name="TofD" size="3">
<option value="Morning">Morning</option>
<option value="Day">Day</option>
<option value="Night">Night</option></select><br />
<input type="submit" value="submit" name="submit">
</form>
<?
} else {
echo "Hello, ".$name." <br />";
echo "You live at ".$address.", ".$city.", ".$state." ".$zip." <br />";
echo "Your Phone# is ".$phone.", and your Email is ".$email.", <br />";
echo "You passed ".$education."! <br />";
foreach ($skill as $s) {
echo $s."<br />";
}
echo "<i>".$accomplishment."</i><br />";
echo "The best time to call is ".$TofD."<br />";
}
?>

Each piece works fine alone, but I want to post a job and have someone send their info to me. I'm not sure a this point how to tie everything together and then set up for an email. Right now the info is being echoed back to the screen. Can anyone help me or give me a hint on how to get these programs tied together and then send an email? Thanks

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest

cron