Ich versuche nun schon über eine Stunde den Fehler zu finden.. leider ohne Erfolg... v
Error:
Parse error: syntax error, unexpected $end in /usr/export/www/vhosts/funnetwork/hosting/arminb151291/ex_perte_login2.php on line 120
Zeile 120:
Komplett:
PHP
<?php
$mysqlhost="localhost"; // MySQL-Host angeben
$mysqluser="seegaming"; // MySQL-User angeben
$mysqlpwd="xxx"; // Passwort angeben
$mysqldb="seegaming"; // Gewuenschte Datenbank angeben
$connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or die("Verbindungsversuch fehlgeschlagen");
mysql_select_db($mysqldb, $connection) or die("Konnte die Datenbank nicht waehlen.");
$sql = "SELECT * FROM ex_perte WHERE id=1";
$ex_perte_query = mysql_query($sql) or die ("Error");
while ($cache = mysql_fetch_object($ex_perte_query)){
$logcheck = $cache->log;
$ipcheck = $cache->ip;
$ipadresse = $REMOTE_ADDR;
if(isset($_POST[realname]))
{
if($logcheck==1 && $ipcheck==$ipadresse)
{
if(empty($_POST['passwort']))
{
echo "BITTE DAS ALTE/NEUE PASSWORT ANGEBEN!";
}
else
{
$postpasswort = $_POST['passwort'];
$postrealname = $_POST['realname'];
$postalter = $_POST['alter'];
$postwohnort = $_POST['wohnort'];
$postcpu = $_POST['cpu'];
$postram = $_POST['ram'];
$postmonitor = $_POST['monitor'];
$postgrafikkarte = $_POST['grafikkarte'];
$postinet = $_POST['inet'];
$postmaus = $_POST['maus'];
$passwort = ".mysql_real_escape_string(trim($postpasswort)).";
$realname = ".mysql_real_escape_string(trim($postrealname)).";
$alter = ".mysql_real_escape_string(trim($postalter)).";
$wohnort = '".mysql_real_escape_string(trim($postwohnort)).";
$cpu = ".mysql_real_escape_string(trim($postcpu)).";
$ram = ".mysql_real_escape_string(trim($postram)).";
$monitor = ".mysql_real_escape_string(trim($postmonitor)).";
$grafikkarte = ".mysql_real_escape_string(trim($postgrafikkarte)).";
$inet = ".mysql_real_escape_string(trim($postinet)).";
$maus = ".mysql_real_escape_string(trim($postmaus)).";
$eintragen = mysql_query("UPDATE ex_perte SET passwort = $passwort WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET realname = $realname WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET alter = $alter WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET wohnort = $wohnort WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET cpu = $cpu WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET ram = $ram WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET monitor = $monitor WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET grafikkarte = $grafikkarte WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET inet = $inet WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET maus = $maus WHERE id=1");
$eintragen = mysql_query("UPDATE ex_perte SET log = 0 WHERE id=1");
}
}
else
{
echo "NICHT EINGELOGGT!";
}
}
?>
<form method="POST" action="?">
<tr>
<td>Real Name:</td><td><input name="realname" value=""></td>
</tr>
<tr>
<td>Alter:</td><td><input name="alter" value=""></td>
</tr>
<tr>
<td>Wohnort:</td><td><input name="wohnort" value=""></td>
</tr>
<tr>
<td>CPU:</td><td><input name="cpu" value=""></td>
</tr>
<tr>
<td>RAM:</td><td><input name="ram" value=""></td>
</tr>
<tr>
<td>Monitor:</td><td><input name="monitor" value=""></td>
</tr>
<tr>
<td>Grafikkarte:</td><td><input name="grafikkarte" value=""></td>
</tr>
<tr>
<td>Internetverbindung:</td><td><input name="inet" value=""></td>
</tr>
<tr>
<td>Maus:</td><td><input name="maus" value=""></td>
</tr>
<tr>
<td> </td><td> </td>
</tr>
<tr>
<td>Neues Passwort:</td><td><input name="passwort" value=""></td>
</tr>
<tr>
<td></td><td><input type="submit" value="Speichern"></td><td></td>
</tr>
</form>
Alles anzeigen
hm...
mfg