Page 1 of 1

Silly Question

Posted: Wed Feb 16, 2005 2:32 am
by fireman_gcfd
Hey Again

I am playing around with a "submit form" and everything is working OK but I have a simple problem that I can't seem to get around. When it gets submitted, it also gets emailed. I would like certain parts of the script to show up BOLD on the email...for whatever reason, I can't seem to make that happen. Here is the script: (the parts I want bold are the variables in the message at the bottom of the script)

Thanks

Code: Select all

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Shift Change Acknowledge</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Theme" content="none, default">
<meta name="Microsoft Border" content="none, default">
</head>

<body>

<p align="center"><font face="Verdana" size="6">
<?php

		$host = gethostbyaddr($HTTP_SERVER_VARS&#1111;'REMOTE_ADDR']);
		$Employee1= $HTTP_POST_VARS&#1111;"Employeename1"];
		$Employee2= $HTTP_POST_VARS&#1111;"Employeename2"];
		$comments= $HTTP_POST_VARS&#1111;"comments"];
		$month1= $HTTP_POST_VARS&#1111;"month1"];
		$month2= $HTTP_POST_VARS&#1111;"month2"];
		$date1= $HTTP_POST_VARS&#1111;"date1"];
		$date2= $HTTP_POST_VARS&#1111;"date2"];
		$shift1= $HTTP_POST_VARS&#1111;"shift1"];
		$shift2= $HTTP_POST_VARS&#1111;"shift2"];
		print
		"<p align="center"><font face="Veranda" size="6">
		Thank you <b>$Employeename1!</font></b></p>
		<p align="center"><font face="Veranda" size="5">
		You will be notified of your shift change on <b>$month1 $date1</font></b></p>
		<p align="center"><font face="Veranda" size="5">
		for the shift on <b>$month2 $date2</font></b></p>
		<p align="center"><font face="Veranda" size="5">
		with <b>$Employeename2</font></b></p>
		<p align="center"><b><i><font face="Verdana" size="5">Click here to return to
		the <a href="home.htm">Home Page</a></font></i></b></p>";
		$message= "Hello! \n\n".$HTTP_POST_VARS&#1111;"Employeename1"]." would like to switch his/her ".$HTTP_POST_VARS&#1111;"shift1"]." shift with ".$HTTP_POST_VARS&#1111;"Employeename2"]." for his/her ".$HTTP_POST_VARS&#1111;"shift2"]." shift.\n\n"."The dates to change would be:".$HTTP_POST_VARS&#1111;"month1"]." the ".$HTTP_POST_VARS&#1111;"date1"]." for ".$HTTP_POST_VARS&#1111;"month2"]." the ".$HTTP_POST_VARS&#1111;"date2"]."\n\nAdditional Comments:\n".$HTTP_POST_VARS&#1111;"comments"] ."\n\n$host";
		mail("clfrwebmaster@coldlake.com","Shift Change", $message );
?>

</body>

</html>

Also on this, not really a big issue, when the email is recieved it shows up as "Wold Wide Web Owner". Is there a way of changing that?

JAZ


feyd | please use the formatting tags

Posted: Wed Feb 16, 2005 2:50 am
by feyd
you have to set the content type of the mail to html; by default, it's plain text.

As for it showing up as World Wide Web Owner, it should be changable via the headers argument. Do some research into headers you can pass.

Roger That

Posted: Wed Feb 16, 2005 1:28 pm
by fireman_gcfd
I'll do some reading tonight and see what I can find. Thanx Again!!


JAZ