IP Reg is a IPAM tool to keep track of assets, nodes (IP addresses, MAC addresses, DNS aliases) within different subnets, over different locations or even VLAN's. Written in PHP, used with a MySQL-database to have a unique insight in your local network.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
ipreg/useredit.php

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");
?>