Hallo allerseits,
nach mehrmaligen googlen,probieren o.ä. habe ich immer noch keine Lösung gefunden zu meinem Problem:
Ausschnitt aus der usercp.php:
Ausschnitt aus der login.php:
nach mehrmaligen googlen,probieren o.ä. habe ich immer noch keine Lösung gefunden zu meinem Problem:
Ausschnitt aus der usercp.php:
PHP-Code:
<?php
include 'login.php';
// Host Connect
mysql_connect($hostname, $username, $password) or DIE('Connection to host is failed, perhaps the service is down!');
// Datenbank Auswahl
mysql_select_db($dbname) or DIE('Database name is not available!');
?>
<?php
if(!isset($_SESSION['user_id'])) {
include ('login.php');
} else {
/*
$rank = "SELECT * user_data WHERE author='".$_SESSION['user_id']."'";
$query = mysql_query($rank) or die(mysql_error());
echo "<center><table border=\"0\" width=\"458\">";
$i = 0;
while($array = mysql_fetch_array($query)) {
$i = $i + 1;
/*
echo "<tr>";
echo "<th width=\"50\ ">".$i.\"</th>";
echo "<th width=\"270\">".$array["id"]."</th>";
echo "<th width=\"155\">".$array["pw"]."</th>";
echo "<th width=\"200\">".$array["comment"]."</th>";
echo "<th width=\"110\">".$array["date"]."</th>";
echo "</tr>";
echo "
<tr>
<th width=\"50\ ">".$i.\"
<th width=\"270\">".$array["id"]."
<th width=\"155\">".$array["pw"]."
<th width=\"200\">".$array["comment"]."
<th width=\"110\">".$array["date"]."
</tr>";
}
*/
$sql= "SELECT * FROM user_data WHERE author='".$_SESSION['user_id']."'";
$result = query($sql) or die(mysql_error());
echo "<center><table border=\"0\" width=\"458\">";
$i = 0;
if (!$result) {
die ('Etwas stimmte mit dem Query nicht: '.$db->error);
}
echo 'Die Ergebnistabelle besitzt '.$result->num_rows." Datensätze<br />\n";
while ($row = $result->fetch_both()) {
$i = $i + 1;
echo "<tr>";
echo "<th width=\"50\ ">".$i.\"</th>";
echo "<th width=\"270\">".$array["id"]."</th>";
echo "<th width=\"155\">".$array["pw"]."</th>";
echo "<th width=\"200\">".$array["comment"]."</th>";
echo "<th width=\"110\">".$array["date"]."</th>";
echo "</tr>";
/*echo "
echo "
<tr>
<th width=\"50\ ">".$i.\"
<th width=\"270\">".$row["id"]."
<th width=\"155\">".$row["pw"]."
<th width=\"200\">".$row["comment"]."
<th width=\"110\">".$row["date"]."
</tr>"; */
}
echo "</table></center><br>"; // close table
}
?>
PHP-Code:
<?php
include 'mysql_inc.php';
// Host Connect
mysql_connect($hostname, $username, $password) or DIE('Connection to host is failed, perhaps the service is down!');
// Datenbank Auswahl
mysql_select_db($dbname) or DIE('Database name is not available!');
if(isset($_POST['submit']) && $_POST['submit'] == 'Einloggen') {
$account = mysql_real_escape_string($_POST['username']);
$code = mysql_real_escape_string($_POST['IDCard']);
$password = mysql_real_escape_string($_POST['Password']);
$select = "SELECT * FROM $tbl_name WHERE username = '".$account."' AND IDCard = '".$code."' AND Password = PASSWORD('$password')";
$query = mysql_query($select) or die(mysql_error());
$result = mysql_num_rows($query);
if($result > 0) {
$fetch = mysql_fetch_object($query);
$_SESSION['user_id'] = $fetch->username;
echo 'Sie haben sich erfolgreich eingeloggt. Sie werden in 5 Sekunden weitergeleitet. <meta http-equiv="refresh" content="5; URL=system/usercp2.php"> ';
} else {
echo '<center>Login fehlgeschlagen!<br>
<a href="index.php?sys=getpw">Passwort vergessen ?</a><br>
</center>';
}
}
?>

Kommentar