Onbekend |
|
ow,Domme fout.Had ik niet gezien.
Edit:Helaas,Nog niet:
Ik wil dus avaurl wijzigen in tabel [users]
Dit is de code.En nu zie ik dat info en website ook niet veranderen in de database.Er moet dus iets fout zijn.
<?php /* ------------------------- */
$OMNILOG = 1;
include("_include-config.php");
if(! check_login()) {
header("Location: login.php");
exit;
}
mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'");
/* ------------------------- */ ?>
<html>
<head>
<title>[( Farwest )]</title>
<link rel="stylesheet" type="text/css" href="<?php echo ($_COOKIE['v'] == 2) ? "css-v2.css" : "css-v1.css"; ?>">
</head>
<body style="background: #DEB887; margin: 0px;">
<table width=100%>
<tr><td class="subTitle"><b>Profiel</b></td>
<?php /* ------------------------- */
print " <tr><td class=\"mainTxt\"><a href=\"profile.php?x={$data->login}\">Bekijk je profiel</a></td></tr>\n";
if(isset($_POST['profile'])) {
$data->url = preg_replace('/\</','<',$_POST['website']);
$data->avaurl = preg_replace('/\</','<',$_POST['avaurl']);
$data->info = preg_replace('/\</','<',substr($_POST['info'],0,500));
mysql_query("UPDATE `[users]` SET `url`='{$data->url}',`info`='{$data->info}','avaurl'='{$data->avaurl}' WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Je profiel is veranderd</td></tr>\n";
}
else if(isset($_POST['password'])) {
if($_POST['pass'] != "" && $_POST['pass'] == $_POST['confirm']) {
mysql_query("UPDATE `[users]` SET `pass`=MD5('{$_POST['pass']}') WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Je wachtwoord is veranderd</td></tr>\n";
}
else
print " <tr><td class=\"mainTxt\">De twee wachtwoorden waren niet identiek</td></tr>\n";
}
$data->url = stripslashes($data->url);
$data->avaurl = stripslashes($data->avaurl);
$data->info = stripslashes($data->info);
print <<<ENDHTML
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>E-Mail:</td> <td>{$data->email}</td></tr>
<tr><td width=100>Website:</td> <td><input type="text" name="website" value="{$data->url}"></td></tr>
<tr><td width=100>Picture(URL):</td> <td><input type="wp" name="avaurl" value="{$data->avaurl}"></td></tr>
<tr><td width=100 valign="top">Info:</td>
<td><textarea name="info" cols=30 rows=10>{$data->info}</textarea></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="profile" value="Verander"></td></tr>
</table></form>
</td></tr>
<tr><td><br></td></tr>
<tr><td class="subTitle"><b>Wachtwoord</b></td></tr>
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>Nieuw:</td> <td><input type="password" name="pass" maxlength=16></td></tr>
<tr><td width=100>Herhaal:</td> <td><input type="password" name="confirm" maxlength=16></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="password" value="Verander"></td></tr>
</table></form>
</td></tr>
ENDHTML;
/* ------------------------- */ ?>
</table>
</body>
</html>
<?php /* ------------------------- */ $OMNILOG = 1; include("_include-config.php"); if(! check_login()) { header("Location: login.php"); } mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'"); /* ------------------------- */ ?> <html> <head> <title>[( Farwest )]</title> <link rel="stylesheet" type="text/css" href=" <?php echo ($_COOKIE['v'] == 2) ? "css-v2.css" : "css-v1.css"; ?>"> </head> <body style="background: #DEB887; margin: 0px;"> <table width=100%> <tr><td class="subTitle"><b>Profiel</b></td> <?php /* ------------------------- */ print " <tr><td class=\"mainTxt\"><a href=\"profile.php?x={$data->login}\">Bekijk je profiel</a></td></tr>\n"; if(isset($_POST['profile'])) { $data->url = preg_replace('/\</','<',$_POST['website']); $data->avaurl = preg_replace('/\</','<',$_POST['avaurl']); mysql_query("UPDATE `[users]` SET `url`='{$data->url}',`info`='{$data->info}','avaurl'='{$data->avaurl}' WHERE `login`='{$data->login}'"); print " <tr><td class=\"mainTxt\">Je profiel is veranderd</td></tr>\n"; } else if(isset($_POST['password'])) { if($_POST['pass'] != "" && $_POST['pass'] == $_POST['confirm']) { mysql_query("UPDATE `[users]` SET `pass`=MD5('{$_POST['pass']}') WHERE `login`='{$data->login}'"); print " <tr><td class=\"mainTxt\">Je wachtwoord is veranderd</td></tr>\n"; } else print " <tr><td class=\"mainTxt\">De twee wachtwoorden waren niet identiek</td></tr>\n"; } <tr><td class="mainTxt"> <form method="post"><table align="center"> <tr><td width=100>E-Mail:</td> <td>{$data->email}</td></tr> <tr><td width=100>Website:</td> <td><input type="text" name="website" value="{$data->url}"></td></tr> <tr><td width=100>Picture(URL):</td> <td><input type="wp" name="avaurl" value="{$data->avaurl}"></td></tr> <tr><td width=100 valign="top">Info:</td> <td><textarea name="info" cols=30 rows=10>{$data->info}</textarea></td></tr> <tr><td></td> <td align="right"><input type="submit" name="profile" value="Verander"></td></tr> </table></form> </td></tr> <tr><td><br></td></tr> <tr><td class="subTitle"><b>Wachtwoord</b></td></tr> <tr><td class="mainTxt"> <form method="post"><table align="center"> <tr><td width=100>Nieuw:</td> <td><input type="password" name="pass" maxlength=16></td></tr> <tr><td width=100>Herhaal:</td> <td><input type="password" name="confirm" maxlength=16></td></tr> <tr><td></td> <td align="right"><input type="submit" name="password" value="Verander"></td></tr> </table></form> </td></tr> ENDHTML; /* ------------------------- */ ?> </table> </body> </html>
Iemand? |