To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Tools > Dreamweaver

Dreamweaver In need of help with Dreamweaver?

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-06-2003, 02:40 AM   #1
brhale
Junior Member
 
Join Date: May 2003
Posts: 12
Email

I currently am using dreamweaver and use php to mail myself new work applications from the website. I would like to put it in tables and that sent to me instead of the "blah" format I have now.

Here is what I use:

<?

$to = ";
$subject = "Work Application for $pos";
$msg = "Name: $name Social: $ssn\n\n";
$msg .= "Addresss: $address\n\n";
$msg .= "Phone: $phone Email: $email\n\n";
$msg .= "Referred by: $referred\n\n";
$msg .= "$ofAge\n\n";
$msg .= "\n\n";
$msg .= "Availability\n\n";
$msg .= "Day shifts: $monday $tueday $wedday $thuday $friday $satday $sunday\n\n";
$msg .= "\n\n";
$msg .= "Night Shifts: $monnight $tuenight $wednight $thunight $frinight $satnight $sunnight\n\n";
$msg .= "Employment Information\n\n";
$msg .= "\n\n";
$msg .= "Posistion: $pos Salary Desired: $salary Start Date: $startdate\n\n";
$msg .= "Employed now? $empnowyn $empnow\n\n";
$msg .= "Applied before? $empbefyn Date: $empbef\n\n";
$msg .= "I $felconyn been convicted of a felony.\n\n";
$msg .= "$felcon\n\n";
$msg .= "\n\n";
$msg .= "Education Information";
$msg .= "\n\n";
$msg .= "High school: $hs Yrs. Attended: $hsatt. Grad? $hsgr Studies: $hssub \n\n";
$msg .= "College: $col Yrs. Attended: $colatt. Grad? $colgr Studies: $colsub\n\n";
$msg .= "Trade school: $ts Yrs. Attended $tsatt. Grad? $tsgr Studies: $tssub\n\n";
$msg .= "Special Studies: $special\n\n";
$msg .= "Military Service: $service\n\n";
$msg .= "Activities: $Activities\n\n";
$msg .= "\n\n";
$msg .= "Employment History";
$msg .= "\n\n";
$msg .= "Job 1: $job1who Dates: $job1from-$job1to\n\n";
$msg .= "Salary: $job1sal Posistion: $job1pos\n\n";
$msg .= "RFL: $job1leave\n\n";
$msg .= "Job 2: $job2who Dates: $job2from-$job2to\n\n";
$msg .= "Salary: $job2sal Posistion: $job2pos\n\n";
$msg .= "RFL: $job2leave\n\n";
$msg .= "Job 3: $job3who Dates: $job3from-$job3to\n\n";
$msg .= "Salary: $job3sal Posistion: $job3pos\n\n";
$msg .= "RFL: $job3leave\n\n";
$msg .= "Job 4: $job4who Dates: $job4from-$job4to\n\n";
$msg .= "Salary: $job4sal Posistion: $job4pos\n\n";
$msg .= "RFL: $job4leave\n\n";
$msg .= "\n\n";
$msg .= "Questions/Comments?\n\n";
$msg .= "$comment\n\n";

mail($to, $subject, $msg, "From: My web site\nReply-To: $email\n");
?>

I would like to streamling this and make it more appeasing to the eye as the text is tough to look at.

Any Suggestions?
__________________
Brett
Php Noob
I'll be questioning you soon!
brhale is offline   Reply With Quote
Old 05-08-2003, 03:44 AM   #2
FrozNic
0100101100100110
 
FrozNic's Avatar
 
Join Date: Apr 2003
Location: http://www.originalityisoverrated.com
Posts: 330
/* recipients */
$to = "Mary <mary@example.com>" . ", " ; // note the comma
$to .= "Kelly <kelly@example.com>";

/* subject */
$subject = "Birthday Reminders for August";

/* message */
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';

/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "From: Birthday Reminder <birthday@example.com>\r\n";

$headers .= "Cc: birthdayarchive@example.com\r\n";
$headers .= "Bcc: birthdaycheck@example.com\r\n";

/* and now mail it */
mail($to, $subject, $message, $headers);


i believe that should work fine...
__________________
http://www.originalityisoverrated.com
OIO.com The ability to go beyond original! Check it out!
FrozNic is offline   Reply With Quote
Old 05-08-2003, 09:36 PM   #3
brhale
Junior Member
 
Join Date: May 2003
Posts: 12
Thanks

Thanks for your help! I'll certainley give that a try.
__________________
Brett
Php Noob
I'll be questioning you soon!
brhale is offline   Reply With Quote
Old 05-09-2003, 12:19 AM   #4
brhale
Junior Member
 
Join Date: May 2003
Posts: 12
Hmmm...

I did this

<?

$to = "";
$subject = "Work Application for $pos";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$msg = '
<html>
<body>
<p>21 or Older:
<? $ofAge ?>
</p>
Removed table due to size of post
<p><br>
<font size="+2"><strong><u>Personal Information</u></strong></font></p>
<table width="82%" border="1" bordercolor="#000000">
<tr align="center" bgcolor="lightgrey">
<td width="14%"><b>
<div align="left">Name:</div>
</b></td>
<td width="39%"><b>
<div align="center">
<? $name ?>
</div>
</b></td>
<td width="13%"><b>
<div align="right">SSN:</div>
</b></td>
<td width="34%"><b>
<div align="center">
<? $ssn ?>
</div>
</b></td>
</tr>
<tr bgcolor="white">
<td><div align="left">Address:</div></td>
<td colspan="3"><div align="left"><? $address?></div></td>
</tr>
<tr bgcolor="lightgrey">
<td><div align="right">Referred by:</div></td>
<td><div align="center"><? $referred ?></div></td>
<td><div align="right">Phone #:</div></td>
<td><div align="center"><? $phone ?></div></td>
</tr>
</table>
<p><br>
<font size="+2"><strong><u>Employment Desired</u></strong></font></p>
<table width="81%" border="1">
<tr align="center" bgcolor="lightgrey">
<td width="33%"><b>Position:</b></td>
<td width="18%"><b>
<div align="center">
<? $pos ?>
</div>
</b></td>
<td width="14%"><b>Start Date:</b></td>
<td width="12%"><b>
<div align="center">
<? $startdate ?>
</div>
</b></td>
<td width="10%"><b>Salary:</b></td>
<td width="13%"><b>
<div align="center">
<? $salary ?>
</div>
</b></td>
</tr>
<tr bgcolor="white">
<td>Are you employed now?</td>
<td>
<div align="center"><? $empnowyn ?></div>
</td>
<td>If so, where?</td>
<td colspan="3">
<div align="center"><? $empnow ?></div>
</td>
</tr>
<tr bgcolor="lightgrey">
<td>Ever applied here before?</td>
<td>
<div align="center"><? $empbefyn ?></div>
</td>
<td>When:</td>
<td colspan="3">
<div align="center"><? $empbef ?></div>
</td>
</tr>
<tr bgcolor="white">
<td>Ever been convicted of a felony?</td>
<td>
<div align="center"><? $felconyn ?></div>
</td>
<td>If so, explain:</td>
<td colspan="3"><div align="center"><? $felcon ?></div></td>
</tr>
</table>
<br>
<table width="80%" border="1">
<tr align="center" bgcolor="lightgrey">
<td width="17%"><b>
<div align="center"><strong>Education</strong></div>
</b></td>
<td width="33%"><b>
<div align="center"><strong>Name of School</strong></div>
</b></td>
<td width="14%"><b>
<div align="center"><strong>Years Attended</strong></div>
</b></td>
<td width="14%"><b>
<div align="center"><strong>Graduation Date</strong></div>
</b></td>
<td width="22%"><b>
<div align="center"><strong>Subjects Studied</strong></div>
</b></td>
</tr>
<tr bgcolor="white">
<td><div align="center">High School</div></td>
<td><div align="center"><? $hs ?></div></td>
<td><div align="center"><? $hsatt ?></div></td>
<td><div align="center"><? $hsgr ?></div></td>
<td><div align="center"><? $hssub ?></div></td>
</tr>
<tr bgcolor="lightgrey">
<td><div align="center">College</div></td>
<td><div align="center"><? $col ?></div></td>
<td><div align="center"><? $colatt ?></div></td>
<td><div align="center"><? $colgr ?></div></td>
<td><div align="center"><? $colsub ?></div></td>
</tr>
<tr bgcolor="white">
<td><div align="center">Trade School</div></td>
<td><div align="center"><? ts ?></div></td>
<td><div align="center"><? $tsatt ?></div></td>
<td><div align="center"><? $tsgr ?></div></td>
<td><div align="center"><? $tssub ?></div></td>
</tr>
</table>
<br>
<table width="75%" border="1">
<tr align="center" bgcolor="lightgrey">
<td width="33%"><b>
<div align="left">Subjects of Special Study or Research Work:</div>
</b></td>
<td width="67%"><b>
<div align="center">
<? $special ?>
</div>
</b></td>
</tr>
<tr bgcolor="white">
<td>U.S. Military or Naval Service:</td>
<td><div align="center"><? $service ?></div></td>
</tr>
<tr bgcolor="lightgrey">
<td>Activities Other than religious:</td>
<td><div align="center"><? $Activities ?></div></td>
</tr>
</table>
<p><strong><font size="+2"><u>Former Employers</u></font></strong></p>
<table width="100%" border="1">
<tr align="center" bgcolor="lightgrey">
<td width="16%" height="34"><b>
<div align="center"><strong>Dates</strong></div>
</b></td>
<td width="36%"><b>
<div align="center"><strong>Name and Address</strong></div>
</b></td>
<td width="12%"><b>
<div align="center"><strong>Salary</strong></div>
</b></td>
<td width="14%"><b>
<div align="center"><strong>Position</strong></div>
</b></td>
<td width="22%"><b>
<div align="center"><strong>Reason for leaving</strong></div>
</b></td>
</tr>
<tr bgcolor="white">
<td height="23">From:
<? $job1from ?>
</td>
<td rowspan="2"><div align="center"><? $job1who ?></div></td>
<td rowspan="2"><div align="center"><? $job1sal ?></div></td>
<td rowspan="2"><div align="center"><? $job1pos?></div></td>
<td rowspan="2"><div align="center"><? $job1leave ?></div></td>
</tr>
<tr bgcolor="lightgrey">
<td bgcolor="#FFFFFF">To:
<? $job1to ?>
</td>
</tr>
<tr bgcolor="white">
<td bgcolor="#CCCCCC">From:
<? $job2from ?>
</td>
<td rowspan="2" bgcolor="#CCCCCC">
<div align="center"><? $job2who ?></div></td>
<td rowspan="2" bgcolor="#CCCCCC">
<div align="center"><? $job2sal ?></div></td>
<td rowspan="2" bgcolor="#CCCCCC">
<div align="center"><? $job2pos ?></div></td>
<td rowspan="2" bgcolor="#CCCCCC">
<div align="center"><? $job2leave ?></div></td>
</tr>
<tr bgcolor="lightgrey">
<td>To: <? $job2from ?></td>
</tr>
<tr bgcolor="white">
<td>From: <? $job3from ?></td>
<td rowspan="2"><div align="center"><? $job3who ?></div></td>
<td rowspan="2"><div align="center"><? $job3sal ?></div></td>
<td rowspan="2"><div align="center"><? $job3pos ?></div></td>
<td rowspan="2"><div align="center"><? $job3leave ?></div></td>
</tr>
<tr bgcolor="lightgrey">
<td bgcolor="#FFFFFF">To:
<? $job3to ?>
</td>
</tr>
<tr bgcolor="white">
<td bgcolor="#CCCCCC">From:
<? $job4from ?>
</td>
<td rowspan="2" bgcolor="#CCCCCC">
<div align="center"><? $job4who ?></div></td>
<td rowspan="2" bgcolor="#CCCCCC">
<div align="center"><? $job4sal ?></div></td>
<td rowspan="2" bgcolor="#CCCCCC">
<div align="center"><? $job4pos ?></div></td>
<td rowspan="2" bgcolor="#CCCCCC">
<div align="center"><? $job4leave ?></div></td>
</tr>
<tr bgcolor="lightgrey">
<td>To: <? $job4from ?></td>
</tr>
</table>
<br>
<table width="75%" border="1" bordercolor="#000000">
<tr align="center" bgcolor="">
<td width="16%" height="76"><b>Questions/Comments:</b></td>
<td width="84%"><b>
<div align="center">
<? $comment ?>
</div>
</b></td>
</tr>
</table>
</body>
</html>
';
mail($to, $subject, $msg, "From: My web site\nReply-To: $email\n");
?>

and all i get back in the email is all the code.

Did I miss something?
Im going to try and make a small test one with on table and see if I can figure it out but please if you see an error, let me know.

Thanks again for you time and help!
__________________
Brett
Php Noob
I'll be questioning you soon!
brhale is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:21 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.