Das geht bei mir immer noch nicht.
Hier mal der ganze Code. Wäre wirklich super wenn Du mir weiterhelfen könntest.
<?php require_once('../../Connections/testdjlist.php'); ?>
<?php CREATE TABLE $djname (
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
djname varchar(15) NOT NULL DEFAULT '',
passwort varchar(50) NOT NULL DEFAULT '');
?>
<?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"] == "form1")) {
$insertSQL = sprintf("INSERT INTO vorlage (djname, vorname, name, strasse, nr, plz, ort, land, geb, email, webseite, handy) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['djname'], "text"),
GetSQLValueString($_POST['vorname'], "text"),
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['strasse'], "text"),
GetSQLValueString($_POST['nr'], "text"),
GetSQLValueString($_POST['plz'], "text"),
GetSQLValueString($_POST['ort'], "text"),
GetSQLValueString($_POST['land'], "text"),
GetSQLValueString($_POST['geb'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['webseite'], "text"),
GetSQLValueString($_POST['handy'], "text"));
mysql_select_db($database_testdjlist, $testdjlist);
$Result1 = mysql_query($insertSQL, $testdjlist) or die(mysql_error());
$insertGoTo = "anmelden2.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>DeeJay`s</title>
<link href="../../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="Logo"><img src="../../bilder/logos/eigene_logos/djlist_logo_140x60.jpg" width="140" height="60" /></div>
<div id="HLmain">
<div align="right"><a href="../../index.php">Startseite</a><br />
<span class="Stil1">DeeJay`s</span><br />
Clubs
<br />
Kontakt<br />
Werbung<br />
Forum<br />
Shop<br />
Gästebuch<br />
Impressum<br />
AGB`s<br />
Spezials<br />
</div>
</div>
<div id="Banner"></div>
<div id="flshWerbung"></div>
<div id="Layer5"></div>
<div id="MAINdoku">
<div align="center">
<p>ANMELDUNG DeeJay LIST</p>
<p>Teil 1/3 </p>
<p> </p>
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Djname:</td>
<td><input type="text" name="djname" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Vorname:</td>
<td><input type="text" name="vorname" value="" size="32"></td>
</tr>
<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">Strasse:</td>
<td><input type="text" name="strasse" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Nr:</td>
<td><input type="text" name="nr" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Plz:</td>
<td><input type="text" name="plz" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ort:</td>
<td><input type="text" name="ort" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Land:</td>
<td><input type="text" name="land" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Geb:</td>
<td><input type="text" name="geb" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Email:</td>
<td><input type="text" name="email" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Webseite:</td>
<td><input type="text" name="webseite" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Handy:</td>
<td><input type="text" name="handy" value="" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Weiter"></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p> </p>
</div>
</div>
<div id="Layer1"></div>
</body>
</html>