<?
require_once("conn.php");
require_once("includes.php");
if (isset($_POST[s1]))
{
if (!empty($_POST[username]) && !empty($_POST[password]) && !empty($_POST[Names])
&& !empty($_POST[EmailAddress]) && !empty($_POST[SelectCategory])
&& !empty($_POST[SiteTitle]) && !empty($_POST[SiteURL]) && ereg("^http://",$_POST[SiteURL]) )
{
$q1 = "insert into counter_members set
username = '$_POST[username]',
password = '$_POST[password]',
Names = '$_POST[Names]',
EmailAddress = '$_POST[EmailAddress]'";
mysql_query($q1) or die('<font size=2 face=Arial, Helvetica, sans-serif><br><br><center>This username is already in use. Please choose another. <BR><BR><a href=javascript:history.back()>Back</A></center>');
$CategoryInfo = explode("|", $_POST[SelectCategory]);
$MemberID = mysql_insert_id();
$q2 = "insert into counter_info set
MemberID = $MemberID,
CategoryID = $CategoryInfo[0],
SubcategoryID = $CategoryInfo[1],
SiteTitle = '$_POST[SiteTitle]',
SiteURL = '$_POST[SiteURL]',
SiteDescription = '$_POST[SiteDescription]'";
mysql_query($q2) or die(mysql_error());
//send an email
$to = $_POST[EmailAddress];
$subject = "Your registration at $_SERVER[HTTP_HOST]";
$message = "Hello $_POST[Names],\nhere is your login information for $_SERVER[HTTP_HOST]\n\nUsername: $_POST[username]\nPassword: $_POST[password]\n\nTo login, follow this link:\nhttp://$_SERVER[HTTP_HOST]/login.php\n\nThank you for your registration!";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";
$headers .= "From: $_SERVER[HTTP_POST] <$aset[ContactEmail]>\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: PHP/" . phpversion()."\n";
mail($to, $subject, $message, $headers);
header("location:login.php?username=$_POST[username]");
exit();
}
}
if(!empty($_POST[SiteURL]))
{
$MyURL = $_POST[SiteURL];
}
else
{
$MyURL = "http://";
}
include_once("template/header.php");
include_once("template/RegisterTemplate.php");
include_once("template/footer.php");
?>merhabalar isimtescil den hosting kullanıyorum bu kayıt olma formu
fakat mail göndermiyor.bunu nasıl stmp li yapabilirim.teşekkürler