hey, im making a edit user profile page, and they enter what they want into some fields, then click submuit and it takes them to a page called, edituserprofilego to update their request...i set all the fields to NONE then went to see if my code worked, i went and changed my AIM field, then went to view profile, it put the AIM field to nothing and displayed it as nothing...heres the code for the editprofilego

//BEGINNING OF EDITUSERPROFILEGO!
if($action == 'edituserprofilego'){
if(isset($userid)){
html_middle_top_profil
e();
$aim2 = $HTTP_POST_VARS['aim'];
$msn = $_POST['msn'];
$icq = $_POST['icq'];
$hobbies = $_POST['hobbies'];
$profile = $_POST['profile'];
$user_profile_id2 = $_GET['userid'];
$product = "UPDATE users SET `aim`='$aim2' WHERE `user_id`='$user_profile_
id2'";
$go = mysql_query($product);
if(!$go){
mysql_error();
}
echo $aim2;
echo '<a href="http://www.counter-craft-central.com/members.php?action=userprofile&userid=' . $user_profile_id2 . '">View Your Profile!</a>';
html_middle_bottom();
}
}

    is it giving you any errors?

    try putting

    echo $product;

    after your $product = "update ......

    line to ensure you are getting all the variables in the query string

      is there any error or it just dont update your database?

        I don't think there are any errors in the script, none show up, it just dont update

          Have you checked your rights on the server? If you dont have appropriate rights on the server - you wont be able to update -
          chances are you can read, but not write...

          Cheers

            naw, ive used this user im using for inserting, updating in such, i can like , on this code, put something in the aim='' thingsa, like aim='blah' and then it will update correctly, but not when i use the var

              Write a Reply...