Jump to content


Photo

this query is acting wierd..


  • Please log in to reply
2 replies to this topic

#1 insrtsnhere13

insrtsnhere13
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 19 April 2006 - 12:59 AM

$query = "UPDATE users SET username=\"$username\" and user_password=\"$password\" and email=\"$email\" and user_level=\"$userlevel\" WHERE id=\"$id\"";

$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());

all of the variables are pulled from a form and pulled properly.. I have echoed all of them during testing..

the form basically reads the database, and fills the form with what the user provided upon registration..

then, when update is pressed, its reads the form, assigns variables to each thing, and then updates the database regardless of a change..

so far, when ive tried changing the any of the entries, instead of updating them, all it does is set the username value "0" and nothing else.

#2 ChambeRFienD

ChambeRFienD
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 19 April 2006 - 01:02 AM

Try this:

$query = "UPDATE users SET username=\"$username\", user_password=\"$password\", email=\"$email\", user_level=\"$userlevel\" WHERE id=\"$id\"";

#3 insrtsnhere13

insrtsnhere13
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 19 April 2006 - 01:35 AM

thanks that did it




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users