freakcx
Erfahrenes Mitglied
Hallo,
Das folgende Script habe ich geschrieben um einen account zu ändern alles soweit gut er ließt die alten Daten aus, ich gebe neue ein, absenden, erfolgreich geändert, doch nichts kommt in der DB an seit 13uhr am coden bitte habt Nachsicht
Das folgende Script habe ich geschrieben um einen account zu ändern alles soweit gut er ließt die alten Daten aus, ich gebe neue ein, absenden, erfolgreich geändert, doch nichts kommt in der DB an seit 13uhr am coden bitte habt Nachsicht
PHP:
<?
include('db_connect.php');
if(isset($_COOKIE["login_cookie"]))
{
$query = mysql_query("SELECT * FROM users WHERE nick = '".$_COOKIE["login_cookie"]."'");
$userdaten = mysql_fetch_array($query);
}
else
{
echo "Sie sind nicht eingeloggt!";
}
$cookie_nick = $_COOKIE["login_cookie"];
$e_nick = $_POST['nick'];
$e_pass = $_POST['pass'];
$e_name1 = $_POST['name1'];
$e_name2 = $_POST['name2'];
$e_location = $_POST['location'];
$e_tele = $_POST['tele'];
$e_birth = $_POST['birth'];
$e_clan = $_POST['clan'];
$e_mail = $_POST['mail'];
$e_icq = $_POST['icq'];
$e_msn = $_POST['msn'];
$e_games = $_POST['games'];
if (isset($_POST['edit_users']))
{
mysql_query('UPDATE users SET (nick = '.$e_nick.', pass = '.$e_pass.', name1 = '.$e_name1.', name2 = '.$e_name2.', location = '.$e_location.', tele = '.$e_tele.', birth = '.$e_birth.', clan = '.$e_clan.', mail = '.$e_mail.', icq = '.$e_icq.', msn = '.$e_msn.', games = '.$e_games.') WHERE (nick = '.$cookie_nick.')');
echo "<font face=\"arial\" size=\"4\" color=\"green\">Ihre Daten wurden erfolgreich geändert!</font>";
}
?>
<table width="600" height="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="23" width="18"></td>
<td height="23" id="navitable"><div align="left">Anmeldung:</div></td>
<td height="23" width="18"> </td>
</tr>
<tr>
<td height="163" width="18"> </td>
<td height="163" width="564" valign="top">
<form method="post" action="<?php echo $PHP_SELF;?>">
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="3">
<tr>
<td class="Stil2"><div align="left">Nick:</div></td>
<td><div align="left">
<input name="nick" type="text" value="<? echo $userdaten["nick"]; ?>" width="100">
*</div></td>
<td> </td>
</tr>
<tr>
<td class="Stil2"><div align="left">Passwort:</div></td>
<td><div align="left">
<input type="password" name="pass" value="<? echo $userdaten["pass"]; ?>" width="100">
*</div></td>
<td> </td>
</tr>
<tr>
<td class="Stil2"><div align="left"></div></td>
<td><div align="left"></div></td>
<td> </td>
</tr>
<tr>
<td width="19%" class="Stil2"><div align="left">Name:</div></td>
<td width="65%"><div align="left">
<input type="text" name="name1" value="<? echo $userdaten["name1"]; ?>" width="150">
</div></td>
<td width="16%"> </td>
</tr>
<tr>
<td class="Stil2"><div align="left">Vorname:</div></td>
<td width="65%"><div align="left">
<input type="text" name="name2" value="<? echo $userdaten["name2"]; ?>" width="150">
</div></td>
<td> </td>
</tr>
<tr>
<td class="Stil2 Stil1"><div align="left"><span class="Stil4">Wohnort:</span></div></td>
<td width="65%"><div align="left">
<input type="text" name="location" value="<? echo $userdaten["location"]; ?>" width="100">
</div></td>
<td> </td>
</tr>
<tr>
<td class="Stil4"><div align="left">Telefonnr:</div></td>
<td width="65%"><div align="left">
<input type="text" name="tele" value="<? echo $userdaten["tele"]; ?>" width="100">
</div></td>
<td> </td>
</tr>
<tr>
<td class="Stil4"><div align="left">Geburtstag:</div></td>
<td><div align="left">
<input type="text" name="birth" maxlength="10" value="<? echo $userdaten["birth"]; ?>" width="55">
*</div></td>
<td> </td>
</tr>
<tr>
<td><div align="left"></div></td>
<td><div align="left"></div></td>
<td> </td>
</tr>
<tr>
<td><div align="left">Clan:</div></td>
<td><div align="left">
<input type="text" name="clan" value="<? echo $userdaten["clan"]; ?>" width="100">
</div></td>
<td> </td>
</tr>
<tr>
<td><div align="left">Email:</div></td>
<td><div align="left">
<input type="text" name="mail" value="<? echo $userdaten["mail"]; ?>" width="150">
*</div></td>
<td> </td>
</tr>
<tr>
<td><div align="left">ICQ:</div></td>
<td><div align="left">
<input type="text" name="icq" value="<? echo $userdaten["icq"]; ?>" width="100">
</div></td>
<td> </td>
</tr>
<tr>
<td><div align="left">MSN:</div></td>
<td><div align="left">
<input type="text" name="msn" value="<? echo $userdaten["msn"]; ?>" width="150">
</div></td>
<td> </td>
</tr>
<tr>
<td><div align="left">Ich zocke:</div></td>
<td><div align="left">
<textarea name="games" width="200"><? echo $userdaten["games"]; ?></textarea>
*</div></td>
<td> </td>
</tr>
<tr>
<td colspan="3"><div align="center">
</div></td>
</tr>
<tr>
<td> </td>
<td width="65%">*Diese Felder sind Pflicht.</td>
<td><input name="edit_users" type="submit" id="form" value="ändern"></td>
</tr>
</table>
</form>
</td>
<td height="163" width="18"> </td>
</tr>
</table>