You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
47 lines
1.0 KiB
<?php
|
|
include("header.php");
|
|
|
|
// get user_id
|
|
$suser_id = $_SESSION['suser_id'];
|
|
|
|
// check for submit
|
|
if ($_SERVER['REQUEST_METHOD']=="POST" ) {
|
|
$displayname = $_POST['displayname'];
|
|
mysql_query("UPDATE user SET displayname='$displayname' WHERE user_id='$suser_id'") or die(mysql_error());
|
|
|
|
header_location("options.php");
|
|
}
|
|
|
|
// get current information
|
|
$result = mysql_query("SELECT displayname FROM user WHERE user_id='$suser_id'");
|
|
while ($row = mysql_fetch_object($result)) {
|
|
$displayname = $row->displayname;
|
|
}
|
|
?>
|
|
|
|
<form method="POST" action="useredit.php">
|
|
<table border="0">
|
|
<tr>
|
|
<td colspan="2">
|
|
<b>Modify settings:</b><br>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
Displayname:
|
|
</td>
|
|
<td>
|
|
<input type="text" name="displayname" value="<?php echo $displayname; ?>">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align="right">
|
|
<input type="submit" value="Submit"><input type="reset" value="Reset">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<?
|
|
include("footer.php");
|
|
?>
|