editerings funktion.
Hello igen :DJeg ville høre hvordan man kan lave en form for sikkerhed på dette site, så det kun er den bruger der er logged ind som kan se sit eget edit site, for atm kan man bare gå op og skrive et andet ID :D
<link rel="STYLESHEET" type="text/css" href="style.css">
<div align="center">
<TABLE WIDTH=475 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
<TR>
<TD> <img src="images/news_01.gif" width=475 height=15 alt=""></TD>
</TR>
<TR>
<TD background="images/news_bg.gif" WIDTH=475 > <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><?php
$hent = mysql_query("SELECT * FROM brugere WHERE userid='$_GET[id]'") or die (mysql_error());
$row = mysql_fetch_array($hent);
?>
<form method="post" action="functions/tag_edit_user.php">
<input type="hidden" name="perform" value="thread">
<input type="hidden" name="userid" value="<?php echo $_GET[id]?> ">
<tr>
<td>Nick</td>
<td>:</td>
<td><input name="navn" type="text" value="<?php echo $row[nick]; ?>" class="input"></td>
</tr>
<tr>
<td>Position</td>
<td>:</td>
<td><input name="position" type="text" value="<?php echo $row[position]; ?>" class="input"></td>
</tr>
<tr>
<td>Status</td>
<td>:</td>
<td><input name="status" type="text" value="<?php echo $row[status]; ?>" class="input"></td>
</tr>
<tr>
<td>Real name </td>
<td>:</td>
<td><input name="name" type="text" value="<?php echo $row[name]; ?>" class="input"></td>
</tr>
<tr>
<td>Location</td>
<td>:</td>
<td><input name="location" type="text" value="<?php echo $row[location]; ?>" class="input"></td>
</tr>
<tr>
<td>Age</td>
<td>:</td>
<td><input name="age" type="text" value="<?php echo $row[age]; ?>" class="input"></td>
</tr>
<tr>
<td>Mail</td>
<td>:</td>
<td><input name="mail" type="text" value="<?php echo $row[email]; ?>" class="input"></td>
</tr>
<tr>
<td>Cpu</td>
<td>:</td>
<td><input name="cpu" type="text" value="<?php echo $row[cpu]; ?>" class="input"></td>
</tr>
<tr>
<td>Memory</td>
<td>:</td>
<td><input name="memory" type="text" value="<?php echo $row[memory]; ?>" class="input"></td>
</tr>
<tr>
<td>Grafix card</td>
<td>:</td>
<td><input name="gfx" type="text" value="<?php echo $row[gfx]; ?>" class="input"></td>
</tr>
<tr>
<td>Mouse</td>
<td>:</td>
<td><input name="mouse" type="text" value="<?php echo $row[mouse]; ?>" class="input"></td>
</tr>
<tr>
<td>Mouse pad</td>
<td>:</td>
<td><input name="pad" type="text" value="<?php echo $row[pad]; ?>" class="input"></td>
</tr>
<tr>
<td>Connection</td>
<td>:</td>
<td><input name="connection" type="text" value="<?php echo $row[connection]; ?>" class="input"></td>
</tr>
<tr>
<td>Config</td>
<td>:</td>
<td><input name="cfg" type="text" value="<?php echo $row[cfg]; ?>" class="input"></td>
</tr>
<tr>
<td>Quote</td>
<td>:</td>
<td><input name="quote" type="text" value="<?php echo $row[quote]; ?>" class="input"></td>
</tr>
<tr>
<td>Pic</td>
<td>:</td>
<td><input name="pic" type="text" value="<?php echo $row[pic]; ?>" class="input"></td>
</tr>
<tr>
<td>Userlvl</td>
<td>:</td>
<td><input name="userlvl" type="text" value="<?php echo $row[level]; ?>" class="input"></td>
</tr>
<tr>
<td>Headset</td>
<td>:</td>
<td><input name="headset" type="text" value="<?php echo $row[headset]; ?>" class="input"></td>
</tr>
<tr>
<td>Monitor</td>
<td>:</td>
<td><input name="monitor" type="text" value="<?php echo $row[monitor]; ?>" class="input"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>
<input type="hidden" name="op" value="ds">
<input type="submit" value="Update" style="font-size: 7pt; font-family: Tahoma;">
</form>
</table>
</td>
</tr>
</table></TD>
</TR>
<TR>
<TD> <IMG SRC="images/news_03.gif" WIDTH=475 HEIGHT=15 ALT=""></TD>
</TR>
</TABLE>
<span class="style6"></span></div>
når en bruger logger ind sætter han en session ved ikk om det er til hjælp... :)
$_SESSION['sessionnr'] = session_id();
$_SESSION['kapow_username'] = $data[nick];
$_SESSION['kapow_password'] = $data[password];
$_SESSION['kapow_level'] = $data[level];
$_SESSION['kapow_email'] = $data[email];
$_SESSION['kapow_id'] = $data[userid];
session_register("sessionnr");
session_register("kapow_username");
session_register("kapow_password");
session_register("kapow_level");
session_register("kapow_email");
session_register("kapow_id");