jo razor wie man die id abfragt also mit WHERE id='1' wusste ich nur das was zwerg schrieb meinte ich trotzdem danke
jo also zwerg deins hab ich mal versucht nur leider scheint es nicht zu klappen.
folgender inhalt steht in der verify.php:
PHP-Code:
<?php
session_start();
$SID = session_id();
require_once("functions/mysql.php");
if(isset($_POST['Login'])) {
$error=false;
$email=$_POST['email'];
$password=md5($_POST['password']);
$check=mysql_query("SELECT * FROM `users` WHERE email='$email' AND password='$password'") or die("Fehler: ".mysql_error());
$data=mysql_fetch_assoc($check);
if($password == $data['password']) {
$_SESSION['email'] = $data['email'];
$_SESSION['password'] = $data['password'];
$_SESSION['id'] == $data['id'];
setcookie("password", $data['password'], time()+3600);
setcookie("id", $data['id'], time()+3600);
setcookie("email", $data['email'], time()+3600);
header("Location:frontpage.php?=".$SID."");
echo "Successfully logged in.";
}
elseif($password != $data['password']) {
$error=true;
$error_msg="You entered a wrong password.";
header("Location:frontpage.php?".$SID."");
}
}
?>
folgendes steht in der usercp.php:
PHP-Code:
<table border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td width="200" valign="top">[img]advertise_1.jpg[/img]</td>
<td width="500" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="20%" align="center">[url="frontpage.php?<?php echo $SID; ?>"]FRONTPAGE[/url]</td>
<td width="20%" align="center">[url="crew.php?<?php echo $SID; ?>"]PLAY CREW[/url]</td>
<td width="20%" align="center">[url="matches.php?<?php echo $SID; ?>"]PLAYED MATCHES[/url]</td>
<td width="20%" align="center">[url="replays.php?<?php echo $SID; ?>"]REPLAYS[/url]</td>
<td width="20%" align="center">[url="sponsors.php?<?php echo $SID; ?>"]SPONSORS[/url]</td>
</tr>
<tr>
<td colspan="5" bgcolor="#333333"></td>
</tr>
<tr>
<td colspan="5" height="5"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="top"><table width="348" border="0" cellpadding="1" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><table width="99%" border="0" align="center" cellspacing="0" cellpadding="1">
<tr>
<td>
<?php
$action=isset($_GET['action']);
if($action=="setup_profile") {
?>
<form method="post" action="usercp.php?action=saveedit" style="display:inline;"><table width="100%" border="0" align="center" cellspacing="0" cellpadding="1">
<tr>
<td colspan="2" class="contentTitle">EDIT PROFILE</td>
<td>
<tr>
<td colspan="2">[img]pfeil.jpg[/img] [url="usercp.php?<?php echo $SID; ?>"]back[/url]</td>
</tr>
<tr>
<td width="12%">Username:</td>
<td>
<input type="text" class="login" style="width: 280px;" name="username">
</td>
</tr>
<tr>
<td>Firstname:</td>
<td><input type="text" class="login" style="width: 280px;" name="firstname"></td>
</tr>
<tr>
<td>Nachname:</td>
<td><input type="text" class="login" style="width: 280px;" name="nachname"></td>
</tr>
<tr>
<td>Birthday:</td>
<td><input type="text" class="login" style="width: 280px;" name="birthday"></td>
</tr>
<tr>
<td>ICQ:</td>
<td><input type="text" class="login" style="width: 280px;" name="icq"></td>
</tr>
<tr>
<td>MSN:</td>
<td><input type="text" class="login" style="width: 280px;" name="msn"></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" class="submit" name="saveedit" value="Submit">
</td>
</tr>
</table></form>
<?php } elseif(isset($_POST['saveedit'])) {
$username=$_POST['username'];
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$msn=$_POST['msn'];
$icq=$_POST['icq'];
$birthday=$_POST['birthday'];
mysql_query("UPDATE `users` SET icq='$icq', msn='$msn', username='$username', firstname='$firstname', lastname='$lastname', birthday='$birthday' WHERE id='".$_SESSION['id']."'") or die("Error: ".mysql_error());
?>
<?php } else { ?>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td colspan="2" style="padding-left: 2px;" class="contentTitle">USERPANEL</td>
</tr>
<tr>
<td width="5%" class="table">[img]nouserpic.jpg[/img]</td>
<td valign="top" style="padding-left: 4px;"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>[img]pfeil.jpg[/img] [url="usercp.php?action=setup_profile&sid=<?php echo $SID; ?>"]Edit profile[/url] </td>
</tr>
<tr>
<td>[img]pfeil.jpg[/img] [url="frontpage.php<?php echo $SID; ?>"]Edit userpic [/url]</td>
</tr>
<tr>
<td>[img]pfeil.jpg[/img] [url="frontpage.php<?php echo $SID; ?>"]Edit avatar [/url]</td>
</tr>
<tr>
<td>[img]pfeil.jpg[/img] [url="frontpage.php<?php echo $SID; ?>"]Change password [/url]</td>
</tr>
</table></td>
</tr>
</table>
<?php } ?>
</td>
</tr>
</table></td>
</tr>
</table></td>
<td valign="top"><table width="148" border="0" cellpadding="1" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top"><table width="97%" border="0" align="center" cellspacing="0" cellpadding="1">
<tr>
<td class="contentTitle">LATEST MATCHES</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td class="contentTitle">ACCOUNT LOGIN</td>
</tr>
<tr>
<td><?php include("login.php"); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="150" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="subContentTitle">ADVERTISING</td>
</tr>
<tr>
<td bgcolor="#333333"></td>
</tr>
<tr>
<td></td>
</tr>
</table></td>
</tr>
</table>
also das script soll bei erfolgreichem ausführen die daten updaten nur leider macht das script ebend garnichts ^^ hm... woran könnte das liegen? das script soll wie gesagt erstmal schlicht ohne überprüfungen sein.