Onbekend |
|
Ik ben bezig met me eigen wargame.
Alles werkt nu alleen nu wil ik nog een activatie mail.
Hij mailt nu alleen als je hebt geregistreerd je gegevens door.
Maar hoe kan ik dan een activatie mail ervan maken?
Dit is me register script:
<?session_start();?><?
include("include2.php");
head();
if ($action == "register") {
if (!$_POST[username] OR !$_POST[email] OR !$_POST[pass1]) {
echo "Je hebt niet alles ingevuld.";
} elseif ($_POST[pass1] != $_POST[pass2]) {
echo "De 2 passwords zijn niet hetzelfde.";
} else {
$result = mysql_query("select * from users where username='$_POST[username]'");
if ($row = mysql_fetch_Array($result)) {
echo "Deze gebruikersnaam is al bezet, neem een andere.";
} else {
mysql_query("INSERT INTO users (id, username, email, ref, glaasjes, euro, coke, weed, speed, lsd, pass) VALUES (NULL, '$_POST[username]', '$_POST[email]', '$_POST[refid]', 0, 0, 0, 0, 0, 0, '$_POST[pass1]')") or print(mysql_error());
$purl = "http://kris.fambaken.nl/home/koop.php?id=" . mysql_insert_id();
echo "Je kan beginnen met het promoten van je url:<br>\n $purl";
mail("$_POST[email]", "Gangstar Wargame", "Beste $_POST[username],\n\nBedankt dat je je hebt geregistreerd op Gangstar Wargame.\nDit is de informatie die je hebt gestuurd:\n\nUsername: $_POST[username]\nPassword: $_POST[pass1]\nUrl: $purl\n\nHave a nice day,\nGangstar Wargame.",
"From: Gangstar Wargame <baken.kris@gmail.com\r\n"
."Reply-To: From: Gangstar Wargame <baken.kris@gmail.com>\r\n"
."X-Mailer: PHP/" . phpversion());
}
}
} else {
?><title>Gangstar Wargame v2.0</title><body>
<form action="register.php?action=register" method="post">
<table border="0" cellspacing="1" cellpadding="1" width="312">
<tr>
<td width="158"><font color="#FFFFFF">Username</font></td>
<td width="147"> <input name="username" type="text" id="username" size="20" style="border-style: solid; border-width: 1"></td>
</tr>
<tr>
<td width="158"><font color="#FFFFFF">Email</font></td>
<td width="147"> <input name="email" type="text" id="email" size="20" style="border-style: solid; border-width: 1"></td>
</tr>
<tr>
<td width="158"><font color="#FFFFFF">Password</font></td>
<td width="147"> <input name="pass1" type="password" id="pass1" size="20" style="border-style: solid; border-width: 1"></td>
</tr>
<tr>
<td width="158"><font color="#FFFFFF">Password opnieuw</font></td>
<td width="147"> <input name="pass2" type="password" id="pass2" size="20" style="border-style: solid; border-width: 1"></td>
</tr>
<tr>
<td width="158"><font color="#FFFFFF">
<input name="refid" type="hidden" id="refid" value="<? echo $_GET[id]; ?>">
</font></td>
<td width="147"> <span style="font-size: 5pt"> <br>
</span> <input type="submit" name="Sumit" value="Register " style="font-family: Verdana; font-size: 10 pt; color: #000000; border: 1px solid #000000; background-color: #FFFFFF"></td>
</tr>
</table>
</form>
<?
}
foot();
?>
include("include2.php"); head(); if ($action == "register") { if (!$_POST[username] OR !$_POST[email] OR !$_POST[pass1]) { echo "Je hebt niet alles ingevuld."; } elseif ($_POST[pass1] != $_POST[pass2]) { echo "De 2 passwords zijn niet hetzelfde."; } else { $result = mysql_query("select * from users where username='$_POST[username]'"); echo "Deze gebruikersnaam is al bezet, neem een andere."; } else { mysql_query("INSERT INTO users (id, username, email, ref, glaasjes, euro, coke, weed, speed, lsd, pass) VALUES (NULL, '$_POST[username]', '$_POST[email]', '$_POST[refid]', 0, 0, 0, 0, 0, 0, '$_POST[pass1]')") or print(mysql_error()); echo "Je kan beginnen met het promoten van je url:<br>\n $purl"; mail("$_POST[email]", "Gangstar Wargame", "Beste $_POST[username],\n\nBedankt dat je je hebt geregistreerd op Gangstar Wargame.\nDit is de informatie die je hebt gestuurd:\n\nUsername: $_POST[username]\nPassword: $_POST[pass1]\nUrl: $purl\n\nHave a nice day,\nGangstar Wargame.", "From: Gangstar Wargame <baken.kris@gmail.com\r\n" ."Reply-To: From: Gangstar Wargame <baken.kris@gmail.com>\r\n" } } } else { ?><title>Gangstar Wargame v2.0</title><body> <form action="register.php?action=register" method="post"> <table border="0" cellspacing="1" cellpadding="1" width="312"> <tr> <td width="158"><font color="#FFFFFF">Username</font></td> <td width="147"> <input name="username" type="text" id="username" size="20" style="border-style: solid; border-width: 1"></td> </tr> <tr> <td width="158"><font color="#FFFFFF">Email</font></td> <td width="147"> <input name="email" type="text" id="email" size="20" style="border-style: solid; border-width: 1"></td> </tr> <tr> <td width="158"><font color="#FFFFFF">Password</font></td> <td width="147"> <input name="pass1" type="password" id="pass1" size="20" style="border-style: solid; border-width: 1"></td> </tr> <tr> <td width="158"><font color="#FFFFFF">Password opnieuw</font></td> <td width="147"> <input name="pass2" type="password" id="pass2" size="20" style="border-style: solid; border-width: 1"></td> </tr> <tr> <td width="158"><font color="#FFFFFF"> <input name="refid" type="hidden" id="refid" value=" <? echo $_GET[id ]; ?>"> </font></td> <td width="147"> <span style="font-size: 5pt"> <br> </span> <input type="submit" name="Sumit" value="Register " style="font-family: Verdana; font-size: 10 pt; color: #000000; border: 1px solid #000000; background-color: #FFFFFF"></td> </tr> </table> </form> <? } foot(); ?>
Heeft iemand hier een tutorial voor ofzow?
|