Har lavet en ny kode som opdatere men den udskriver ikke gamle data nogen hjælp her
?
<?
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>[Team-SMG]</title>
<style type="text/css">
<!--
body,td,th {
color: #000000;
}
body {
background-color: #BE0000;
}
a:link {
color: #000000;
font-weight: bold;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style></head>
<body>
<div align="center">
<div align="center">
</div>
<p align="center"><strong>Edit Profile </strong>- <strong>Dont Work </strong></p>
<div align="center">
<?
include ("sql.php");
$result = mysql_query("SELECT * FROM users WHERE brugernavn='".$brugernavn."'");
$row = mysql_fetch_row($result);
$pnick = $_POST['nick'];
$psteamid = $_POST['steamid'];
$pemail = $_POST['email'];
$picq = $_POST['icq'];
$pclan = $_POST['team'];
$ploc = $_POST['icq'];
$nick = $row['nick'];
$steamid = $row['steamid'];
$email = $row['email'];
$icq = $row['icq'];
$clan = $row['team'];
$loc = $row['loc'];
$user = $row['brugernavn'];
if(isset($_GET['checkupdate'])){
if(empty($pnick)) {
echo "The fields are not full !";
}elseif(empty($psteamid)){
echo "The fields are not full !";
}elseif (empty($pemail)){
echo "The fields are not full !";
}elseif(empty($picq)){
echo "The fields are not full !";
}elseif(empty($pclan)){
echo "The fields are not full !";
}elseif(empty($ploc)){
echo "The fields are not full !";
}else{
mysql_query("UPDATE users SET nick='".$_POST[nick]."', steamid='".$_POST[steamid]."', email='".$_POST[email]."', icq='".$_POST[icq]."', team='".$_POST[team]."', loc='".$_POST[loc]."' WHERE brugernavn = '$brugernavn'");
echo "You account data is updatet";
}
}
?>
<form method="post" action="edit.php?checkupdate">
<p align="center">Nickname:<br />
<input type="text" name="nick" style="background-color:#99CCCC" value="<?php echo ($nick);?>"/>
<br />
Steam ID:<br />
<input type="text" name="steamid" style="background-color:#99CCCC" value="<?php echo ($steamid);?>"/>
<br />
E-Mail:<br />
<input type="text" name="email" style="background-color:#99CCCC" value="<?php echo ($email); ?>"/>
<br />
ICQ:<br />
<input type="text" name="icq" style="background-color:#99CCCC" value="<?php echo ($icq); ?>"/>
<br />
Clan:<br />
<input type="text" name="team" style="background-color:#99CCCC" value="<?php echo ($clan); ?>"/>
<br />
Location:<br />
<input type="text" name="loc" style="background-color:#99CCCC" value="<?php echo ($loc); ?>"/>
<br />
<input name="submit" type="submit" style="background-color:#99CCCC" value="Update"/>
</body>
</html>
Indlæg senest redigeret d. 14.12.2006 19:21 af Bruger #8884