Also ich habe ein Übergabeformular gemacht und das wird dann weitergeleitet an eine andere php datei die das dann in die db postet.
dann kommt immer dieser fehler, wenn ich versuche etwas zu posten: "You have an error in your SQL syntax near 'alter, geburtstag, comment, graka, soundkarte, festplatte, headset) VALUES ('S' at line 1Member erfolgreich geadddet"
hier mal die add datei:
<?php
include "config.inc.php";
include "connect.inc.php";
if(isset($password)) {
$news1 = mysql_query("SELECT id FROM bipuser WHERE password = '$password'");
$abc = mysql_num_rows($news1);
if ($abc == 0) {
echo 'Nicht eingeloggt...';
}
elseif ($abc == 1) {
while($row = mysql_fetch_object($news1)) {
?>
<b>- Member adden -</b>
<p>
<form name="member" method="post" action="admin.php?go=memberpost">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%" align="left">
Nickname:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="nickname" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Funktion:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="funktion" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Email:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="email" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Homepage:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="homepage" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">CPU:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="cpu" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Ram:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="ram" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Maus:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="maus" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Mauspad:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="mauspad" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Monitor:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="monitor" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Realname:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="realname" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Wohnort:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="wohnort" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Alter:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="alter" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Geburtstag</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="geburtstag" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Comment:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="comment" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Graka:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="graka" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Soundkarte:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="soundkarte" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Festplatte:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="festplatte" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Headset:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="headset" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Add Member">
</td>
</tr>
</table>
<p> </p>
<p> </p>
<?php
}
}
}
else {
echo 'Nicht eingeloggt...';
}
?>
die post datei:
<?php
if ($nickname == "") {
echo 'Namenlose Menschen bringen nix.<br> <a href=javascript:history.back() target=_self><- back</a>';
}
else
{
include "config.inc.php";
include "connect.inc.php";
$entered = "INSERT INTO bipmembers (nickname, funktion, email, homepage, cpu, ram, maus, mauspad, monitor, realname, wohnort, alter, geburtstag, comment, graka, soundkarte, festplatte, headset)
VALUES ('$nickname', '$funktion', '$email', '$homepage', '$cpu', '$ram', '$maus', '$mauspad', '$monitor', '$realname', '$wohnort', '$alter', '$geburtstag', '$comment', '$graka', '$soundkarte', '$festplatte', '$headset')";
$entered_b = mysql_query($entered);
}
echo mysql_error();
?>
Member erfolgreich geadddet
was ist daran falsch ?
ich verzweifel echt :/
dann kommt immer dieser fehler, wenn ich versuche etwas zu posten: "You have an error in your SQL syntax near 'alter, geburtstag, comment, graka, soundkarte, festplatte, headset) VALUES ('S' at line 1Member erfolgreich geadddet"
hier mal die add datei:
<?php
include "config.inc.php";
include "connect.inc.php";
if(isset($password)) {
$news1 = mysql_query("SELECT id FROM bipuser WHERE password = '$password'");
$abc = mysql_num_rows($news1);
if ($abc == 0) {
echo 'Nicht eingeloggt...';
}
elseif ($abc == 1) {
while($row = mysql_fetch_object($news1)) {
?>
<b>- Member adden -</b>
<p>
<form name="member" method="post" action="admin.php?go=memberpost">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%" align="left">
Nickname:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="nickname" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Funktion:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="funktion" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Email:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="email" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Homepage:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="homepage" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">CPU:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="cpu" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Ram:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="ram" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Maus:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="maus" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Mauspad:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="mauspad" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Monitor:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="monitor" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Realname:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="realname" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Wohnort:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="wohnort" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Alter:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="alter" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Geburtstag</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="geburtstag" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Comment:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="comment" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Graka:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="graka" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Soundkarte:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="soundkarte" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Festplatte:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="festplatte" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td width="10%" align="left">
Headset:</font>
</td>
<td width="5%" align="left">
</td>
<font size="1" face="verdana">
<td width="85%" align="left">
<input type="text" name="headset" size="35">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr height="1">
<td colspan="2">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Add Member">
</td>
</tr>
</table>
<p> </p>
<p> </p>
<?php
}
}
}
else {
echo 'Nicht eingeloggt...';
}
?>
die post datei:
<?php
if ($nickname == "") {
echo 'Namenlose Menschen bringen nix.<br> <a href=javascript:history.back() target=_self><- back</a>';
}
else
{
include "config.inc.php";
include "connect.inc.php";
$entered = "INSERT INTO bipmembers (nickname, funktion, email, homepage, cpu, ram, maus, mauspad, monitor, realname, wohnort, alter, geburtstag, comment, graka, soundkarte, festplatte, headset)
VALUES ('$nickname', '$funktion', '$email', '$homepage', '$cpu', '$ram', '$maus', '$mauspad', '$monitor', '$realname', '$wohnort', '$alter', '$geburtstag', '$comment', '$graka', '$soundkarte', '$festplatte', '$headset')";
$entered_b = mysql_query($entered);
}
echo mysql_error();
?>
Member erfolgreich geadddet
was ist daran falsch ?
ich verzweifel echt :/