Jump to content

PHP E-mail Confirmation


Ugat

Recommended Posts

Hi Guys,

 

Can I ask you a question regarding email confirmation like this for forum after you register here is my code.

 

<?php
$to = "[email protected]"; 
$booth = $_POST["element_1"];
$name=$_POST["element_5"];
$company = $_POST["element_2"];
$address = $_POST["element_3"];
$tel= $_POST["element_4"];
$faxno=$_POST["element_6"];
$email = $_POST["element_7"];
$auth=$_POST["element_8"];
$position=$_POST["element_9"];
$nature=$_POST["element_10"];
$headers = "MIME-Version: 1.0\r";
$headers.= "Content-Type: text/html;";
$headers.= "charset=iso-8859-1\r";
$headers.= "From: $company";

$body = "Booth Type: " . "$booth" .
	"Name: ". "$name\r\n".
	"Company: " . "$company\r\n" .
	"Address: " . "$address\r\n" .
	"Telephone Number: " . "$tel\r\n" .
	"Fax.Number: " . "$faxno\r\n" .
	"Email-Address:". "$email\r\n" .
	"Authorized Representative:\r\n" . "$auth" .
	"Position:" . "$position\r\n" .
	"Nature of Business: " . "$nature\r\n";


mail("$to", "Exhibitor Online Information Form", $body, "$company" );

echo("<html><head><title>Exhibitor Online Information Form</title><script>function update(){top.location='index.php';}var refresh=setInterval('update()',2000);
</script></head><body onload=refresh ><div align=center><center><table border=1pt cellpadding=0 cellspacing=0 style=border-collapse: collapse;
bordercolor=#FF9900 bgcolor=#FFFFFF><tr><td><table border=0 cellpadding=3 cellspacing=0 style=border-collapse: collapse; bordercolor=#FF9900>
<tr><td><b><font color=#666666><font face=verdana size=2>Message Already Sent Successfully!</font></font></b></td></tr></table></td></tr>
</table></center></div><p align=center><font face=Verdana size=2 color=#333333>
</font>.
</font></p><body></html>");

?>

 

Hope you can help me.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/195527-php-e-mail-confirmation/
Share on other sites

I mean I need a confirmation to send his email that said that his or her account already registered.

 

Thanks.

$from = "[email protected]";
$headers = "From: $from";
mail($email,"You have successfully registered","hai you have successfully registered here...",$headers);

put this after the mail("$to", "Exhibitor Online Information Form", $body, "$company" );

I think this is what u r looking for

 

$subject = 'Confirm your e-mail address with YourSite!';

	$mail_body = '<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
				 <tr>
			  <td height="30" colspan="2"><img src="'.SITE_WS_PATH.'/images/email-logo.jpg"></td>
  </tr>
					  <td width="207" bgcolor="#006699"><span style="color:#FFFFFF; font-size:16px; font-weight:bold;">Confirm your e-mail address with YourSite </span></td>
					    <td width="193" height="30" align="right" bgcolor="#006699"><a href="http://www.yourSite.ca" style="color:#FFFFFF;">yourSite</a>  </td>
				  </tr>
				  <tr>
					<td colspan="2"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
					  <tr>
						<td>Hello '.$first_name.' '.$last_name.'<br>
						 Please <a href="'.SITE_WS_PATH.'/verify-account.php?mail='.$insert_id.'&verify='.$verification_no.'" class="bluelink" target="_blank">click here</a> to activate your account.<br>
						 </td>
					  </tr>
					</table></td>
				  </tr>
				  <tr>
					<td colspan="2"> </td>
				  </tr>
				  <tr>
					<td colspan="2">NOTE:
					If for some reason the link   doesn\'t work or doesn\'t lead to the required result, copy and paste the link to your browser manually.</td>
				  </tr>
				  
				  <tr>
					<td colspan="2"> </td>
				  </tr>
				  <tr>
					<td colspan="2">Your yourSite Team</td>
				  </tr>
				  <tr>
					<td colspan="2"> </td>
				  </tr>
				  <tr>
					<td colspan="2"><table width="100%" border="0" cellspacing="1" cellpadding="1">
					  <tr>
						<td>©
						 2010 yourSite Inc.- All rights reserved<br />
						  <a href="http://www.yourSite.ca/term-condition-hh.php">Terms & Conditions</a> | <a href="http://www.yourSite.ca/privacy-policy.php">Privacy Policy</a><br />
					      <a href="http://www.yourSite.ca" class="bluelink">http://www.yourSite.com</a>		  </td>
					  </tr>
					</table></td>
				  </tr>
				  <tr>
					<td colspan="2"> </td>
				  </tr>
				</table>';
		$headers  = "MIME-Version: 1.0" . "\n";
		$headers .= "Content-type: text/html; charset=iso-8859-1" . "\n";
		$headers .= "To: ".$email."\n";
		$headers .= "From: ".ADMIN_EMAIL."\n";
		//print $headers;
		@mail($email, $subject, $mail_body, $headers);

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.