basically it loads the profile of the person logged in correctly no problemo, then if the user fills out more information and clicks edit. it comes up saying its been edited but the sql is not updated, i think its to do with the $REQUEST_METHOD=="POST" thing but im not sure
help if you can please
thanks in advance
heres the code:
if ($REQUEST_METHOD=="POST") {
$sql = " UPDATE ".$membertable." SET";
$sql = $sql ."email = '".$_POST['email']."',";
$sql = $sql ."www = '".$_POST['www']."',";
$sql = $sql ."hg = '".$_POST['hg']."',";
$sql = $sql ."hs = '".$_POST['hs']."' ";
$sql = $sql ."WHERE username = '".$_POST['username']."' ";
echo "Profile Edited!";
} else {
$sql = "SELECT * FROM ".$membertable." WHERE username = '".$username."' ";
$result = mysql_query($sql);
if(mysql_num_rows($result)) {
while ($row = mysql_fetch_array($result)) {
$password = $row["password"];
$id = $row["id"];
$email = $row["email"];
$hg = $row["hg"];
$hs = $row["hs"];
$www = $row["www"];
} // while
} // if
echo "<form name='profile' method='post' action='profile.php'>
<table border=1 bordercolor='#CCCCCC'>
<tr><td colspan=2><input name='id' type='hidden' value='".$id."'></td></tr>
<tr><td>Username</td><td><input name='username' type='hidden' value=".$username.">".$username."</td></tr>
<tr><td>Email Address</td><td><input name='email' type='text' value=".$email."></td></tr>
<tr><td>Website URL</td><td><input name='www' type='text' value=".$www."></td></tr>
<tr><td>Highest Game</td><td><input name='hg' type='text' value=".$hg."></td></tr>
<tr><td>Highest Series</td><td><input name='hs' type='text' value=".$hs."></td></tr>
<tr><td>Current Password:</td><td>".$password."</td></tr>
<tr><td>New Password</td><td><input name='newpass' type='text'></td></tr>
<tr><td colspan=2><input type='submit' name='submit' value='Edit Info'></td></tr>
</table>
</form>";
}