Jump to content

this query is acting wierd..


insrtsnhere13

Recommended Posts

[code]$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());[/code]

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.