Location: PHPKode > projects > PHP Multiple Newsletters > email.php
<?php
/***************************************************************************
File Name 	: email.php
Domain		: http://www.triangle-solutions.com/
----------------------------------------------------------------------------
Author		: Ian Warner
Copyright	: (C) 2001 Triangle Solutions Ltd
Email		: hide@address.com
URL		: http://www.triangle-solutions.com/
Description	: Shows the Templates for the Plain and HTML variations.
Date Created	: Thursday 17 April 2003 14:45:08
****************************************************************************/

############ INCLUDE THE CONFIG AND HEADER FILE ############

include('config.php');

IF ($_GET['emailid'] == 'plain')
	$field = 'tipnl_plainemail';
	ELSE
		$field = 'tipnl_htmlemail';

$query = "	SELECT $field
		FROM newsletters
		WHERE tipnl_id = '".$_GET['newsid']."'";

$result = @mysql_query($query);
$row = @mysql_fetch_array($result);

extract($row);

IF ($field == 'tipnl_plainemail')
	echo stripslashes(nl2br($$field));
	ELSE
		echo stripslashes($$field);
?>
Return current item: PHP Multiple Newsletters