thx! !!!!!!
Zwar nett aber ich kan die register.php nichtmal aufm Desktop haun... :mad:Quote:
[Only registered and activated users can see links. Click Here To Register...] einfach scripts Ordner in htdocs Ordner klatschen.
<?php
if(isset($_POST['submit'])) {
include('../../inc/dbsettings.php');
include('../../inc/functions.php');
} else {
include('inc/dbsettings.php');
include('inc/functions.php');
}
if($mysql == "1")
{
?>
<div class="contentBoxTop"></div><div class="contentBox">
<form action="scripts/register/register.php" method="post">
<table width="400" border="0">
<tr>
<td width="150">Username:</td>
<td colspan="2" width="300"><input type="text" name="username" size="40" /></td>
</tr><tr>
<td width="150">Password:</td>
<td colspan="2" width="300"><input type="password" name="password" size="40" /></td>
</tr><tr>
<td width="150">Real Name:</td>
<td colspan="2" width="300"><input type="text" name="rl_name" size="40" /></td>
</tr><tr>
<td width="150">E-Mail:</td>
<td colspan="2" width="300"><input type="text" name="email" size="40" /></td>
</tr><tr>
<td width="150">Löschcode:</td>
<td colspan="2" width="300"><input type="text" name="code" size="40" /></td>
</tr><tr>
<td width="150">Sicherheits-<br>Frage:</td>
<td colspan="2" width="300"><select name="question">
<option value="1">Name des Haustieres</option>
<option value="2">Lieblingsessen</option>
<option value="3">Lieblingsstadt</option>
<option value="4">Geburtsort</option>
<option value="5">Geburtsname der Mutter</option>
</select>
</td>
</tr><tr>
<td width="150">Antwort:</td>
<td colspan="2" width="300"><input type="text" name="answer1" size="40" /></td>
</tr><tr>
<td width="150">Antwort<br>wiederholen:</td>
<td colspan="2" width="300"><input type="text" name="answer2" size="40" /></td>
</tr><tr>
</tr>
</table>
<input type="submit" name="submit" value="Register" />
</form>
</div>
<div class="contentBoxBottom"></div>
<?php
} else {
echo "Datenbankverbindung konnte nicht hergestellt werden!";
}
$captcha = $_POST['captcha'];
$captcha2 = $_POST['captcha2'];
$dbname = "account";
mysql_connect($dbhost, $dbuser, $dbpw) OR
die("Fehler beim Verbinden mit der Datenbank: ".mysql_error());
mysql_select_db($dbname) OR
die("Fehler beim Benutzen der Datenbank: ".mysql_error());
if(isset($_POST['submit']) && $_POST['submit'] == 'Register') {
$username = mysql_real_escape_string($_POST['username']);
$answer1 = mysql_real_escape_string($_POST['answer1']);
$answer2 = mysql_real_escape_string($_POST['answer2']);
$question = mysql_real_escape_string($_POST['question']);
$password = mysql_real_escape_string($_POST['password']);
$rlname = mysql_real_escape_string($_POST['rl_name']);
$email = mysql_real_escape_string($_POST['email']);
$code = $_POST['code'];
$coins = "0";
if($username != "" and $password != "" and $question != "" and $answer1 != "" and $answer2 != "" and $rlname != "" and $email != "" and $code != "")
{
$sql = "INSERT INTO account SET login = '".$username."',question1 = '".$question."', answer1 = '".$answer1."', answer2 = '".$answer2."', coins = '".$coins."', password = PASSWORD('".$password."'), real_name = '".$rl_name."', email = '".$email."', social_id = '".$code."'";
$result = mysql_query($sql);
if($result) { echo "<meta http-equiv=\"refresh\" content=\"0; url=../../index.php?page=success&action=register\">"; } else { echo 'NOT'; }
} else {
echo "<meta http-equiv=\"refresh\" content=\"0; url=../../index.php?page=error&action=Du hast nicht alle Felder ausgefüllt!\">";
}
}
?>