<?php require_once('../../Connections/mel90.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
$insertSQL = sprintf("INSERT INTO login (Name, mail, Benuzername, Passwort) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['Name'], "text"),
GetSQLValueString($_POST['mail'], "text"),
GetSQLValueString($_POST['Benuzername'], "text"),
GetSQLValueString($_POST['Passwort'], "text"));
mysql_select_db($database_mel90, $mel90);
$Result1 = mysql_query($insertSQL, $mel90) or die(mysql_error());
$insertGoTo = "registrierung-ok.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
<style type="text/css">
<!--
.Stil1 {font-family: Arial, Helvetica, sans-serif}
#Layer1 {
position:absolute;
left:33px;
top:46px;
width:427px;
height:55px;
z-index:1;
}
-->
</style>
</head>
<body>
<div class="Stil1" id="Layer1">
<div align="center">Registrierung </div>
</div>
<table width="478" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="478" height="332"><div align="left">
<form id="form1" name="form1" method="post" action="">
<label></label>
<label></label>
</p>
</form>
<form method="post" name="form2" action="<?php echo $editFormAction; ?>">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Name:</td>
<td><input type="text" name="Name" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">E-Mail:</td>
<td><input type="text" name="mail" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Benuzername:</td>
<td><input type="text" name="Benuzername" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Passwort:</td>
<td><input type="text" name="Passwort" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"></td>
<td><input type="submit" value="Registrieren"></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form2">
</form>
</p>
</div>
Wer sich mit falschem namen oder E-Mail adresse Registriert wird automatisch gelöscht!</p>
Wer sich mehrmals registriert auch! </p></td>
</tr>
</table>
</body>
</html>