I’d like an account creation code, please
--Isaac
I can't think of what to do to make it accept entries for multiple emails, can someone help?PHP Code:<?php
/**************************************
* EMAIL DISTRIBUTION SYSTEM
* by Isaac D.
***************************************/
/*
* DATABASE SCHEMA
CREATE TABLE mason_emails
(
ID int(10) NOT NULL auto_increment,
name varchar(80) NOT NULL,
email varchar(80) NOT NULL,
INDEX email(email),
PRIMARY KEY (ID)
);
*
*/
//<--------------------------------------->
//< CONFIGURATION >
$path = "C:\\blahblah\\blahblah\";
$fname = "emails";
$ext = ".txt";
//< >
//<--------------------------------------->
function printHeader($title)
{
?>
<html>
<head>
<title>EDS - $title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="EDS" />
<basefont face="arial" />
<style>
BODY { scrollbar-3d-light-color:#ffffff;
scrollbar-arrow-color:#ffffff;
scrollbar-base-color:white;
scrollbar-dark-shadow-color:#000099;
scrollbar-face-color:#000099;
scrollbar-highlight-color:#ffffff;
scrollbar-shadow-color:white}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000099" link="#000099" vlink="#000099" alink="#FFFFFF">
<table cellpadding="3" cellspacing="0" border="1" width="100%" bordercolor="#336699" bordercolorlight="#336699" bordercolordark="#FFFFFF">
<tr Valign="top">
<td>
<?php
}
function printSecHeader($title)
{
?>
<tr>
<td bgcolor="steelblue" colspan="2"><font size="1"><b><font size="2" face="Arial" color="white">$title</font></b></font></td>
</tr>
<?php
}
function makeOptOpen($title, $description="")
{
?>
<tr valign='top'><td bgcolor="lightsteelblue" width="25%"> <!-- Options Section: <?php print $title; ?> -->
<b><big><font color="steelblue" face="Arial"><?php print $title; ?></font></big></b><br />
<?php print $description; ?> </td>
<td bgcolor="#EFEFEF">
<?php
}
function makeOptClose()
{?>
</td>
</td></tr>
<?php
}
function printFooter()
{
?>
</table><br clear="all" />
</body>
</html>
<?php
}
function printAddForm()
{
global $HTTP_POST_VARS, $i, $atn;
if(!$i) $i = 0;
?>
<fieldset title="Add Emails" style="position : absolute; top:20 left:10">
<legend name="Add"></legend>
<form action="<?php print$HTTP_SERVER_VARS["PHP_SELF"]."?atn=add"; ?>" method="post">
<blockquote>
<input type="text" name="i" value="<?php print $i; ?>" /> <input type="submit" name="elemnumber" Value="Generate" />
</blockquote>
<blockquote>
<?php
$total = $i
for($i = 0; $i < $total; $i++)
{
?>
<input type="text" name="email<?php print $i; ?>" />
<input type="text" name="name<?php print $i; ?>" /><?php
}
?>
</blockquote>
<blockquote>
<input type="submit" name="submit" Value="submit" />
</blockquote>
</form>
</fieldset>
<?php
}
function ewrite($entry)
{
$thefile = $path.$fname.$ext;
$fp = fopen($thefile,"a");
$result = fwrite($fp,$entry);
if(!$result)
return false;
else
fclose($fp);
}
function eread()
{
$thefile = $path.$fname.$ext;
$fp = fopen($thefile,"r");
$emails = fread($fp, filesize($thefile));
fclose($fp);
}
function ()
{
}
/*
function ()
{
}
*/
if(!$HTTP_POST_VARS["atn"])
$atn = "home";
if(!$HTTP_POST_VARS["i"])
$i = 3;
else
$i = $HTTP_POST_VARS["i"]
if(isset($atn) && $atn == "add")
{
if(isset($submit))
{
if(!$email1 || !$name1)
{
?><big>»</big><font color="red">You forget to fill in 1 or more required fields.</font>
<?php
}
extract($HTTP_POST_VARS);
for($i = 0; ; $i++)
{
}
}
printHeader("Add Emails");
printAddForm();
printFooter();
}
?>




)...
and it isn't going away. Can someone get me pointed in the right direction with this one?

Bookmarks