Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `Id` = 13' at line 12
<?php
include ("checkuser.php");
include ("configs/class.inc.php");
include ("configs/config.inc.php");
mysql_connect($host, $user, $pass) or die ("Keine Verbindung zu der Datenbank möglich.");
mysql_select_db($db);
$sql = "SELECT * FROM loginscript WHERE Id = \"{$_SESSION['user_id']}\"";
$res = mysql_query($sql) OR die(mysql_error());
$userdaten = mysql_fetch_assoc(mysql_query('SELECT * FROM `loginscript` WHERE `Id`='.$_SESSION['user_id']));
if ($_POST['submit'])
{
$sql = 'UPDATE `loginscript` SET
`Vorname` = \''.mysql_real_escape_string($_POST['Vorname']).'\',
`Nachname` = \''.mysql_real_escape_string($_POST['Nachname']).'\',
`Strasse` = \''.mysql_real_escape_string($_POST['Strasse']).'\',
`Ort` = \''.mysql_real_escape_string($_POST['Ort']).'\',
`PLZ` = \''.mysql_real_escape_string($_POST['PLZ']).'\',
`Festnetz` = \''.mysql_real_escape_string($_POST['Festnetz']).'\',
`Mobil` = \''.mysql_real_escape_string($_POST['Mobil']).'\',
`Username` = \''.mysql_real_escape_string($_POST['Username']).'\',
`email` = \''.mysql_real_escape_string($_POST['email']).'\',
`Passwort` = \''.mysql_real_escape_string(md5($_POST['Passwort'])).'\',
WHERE `Id` = '.$_SESSION['user_id'];
mysql_query($sql) OR die(mysql_error());
echo 'Die Einstellungen wurden übernommen!';
}
echo '
<form method="post" action="" enctype="multipart/form-data">
<table width="580" border="0" align="center" />
<tr>
<td class="table2" align="left">Username:</td>
<td class="table2" align="left"><input type="text" name="Username" value="'.$userdaten['Username'].'" size="30" /></td>
</tr>
<tr>
<td class="table1" align="left">Passwort:</td>
<td class="table1" align="left"><input type="password" name="Passwort" size="30" /></td>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td class="table2" align="left">Vorname:</td>
<td class="table2" align="left"><input type="text" name="Vorname" size="30" value="'.$userdaten['Vorname'].'" /></td>
</tr>
<tr>
<td class="table1" align="left">Nachname:</td>
<td class="table1" align="left"><input type="text" name="Nachname" size="30" value="'.$userdaten['Nachname'].'" /></td>
</tr>
<tr>
<td class="table2" align="left">Strasse:</td>
<td class="table2" align="left"><input type="text" name="Strasse" size="30" value="'.$userdaten['Strasse'].'" /></td>
</tr>
<tr>
<td class="table1" align="left">PLZ:</td>
<td class="table1" align="left"><input type="text" name="PLZ" size="30" value="'.$userdaten['PLZ'].'" /></td>
</tr>
<tr>
<td class="table2" align="left">Ort:</td>
<td class="table2" align="left"><input type="text" name="Ort" size="30" value="'.$userdaten['Ort'].'" /></td>
</tr>
<tr>
<td class="table1" align="left">Festnetz:</td>
<td class="table1" align="left"><input type="text" name="Festnetz" size="30" value="'.$userdaten['Festnetz'].'" /></td>
</tr>
<tr>
<td class="table2" align="left">Mobil:</td>
<td class="table2" align="left"><input type="text" name="Mobil" size="30" value="'.$userdaten['Mobil'].'" /></td>
</tr>
<tr>
<td></td>
<td align="center"><input name="Reset" type="reset" value="Abbrechen"><input type="submit" name="submit" value="Speichern"/></td>
</tr>
</table>
</form>';
mysql_free_result($res);
?>