I am trying to make a website written in C# in Visual Studio 2010. I got a database in .accdb extention.
So I go a table in the database called usertb, and in the table username is the key, and the data password and DOB in columns.
Now I need to make a function to edit a user profile, which lets the user to enter a new password and Date of Birth. After that, it will save to the database.
I don't know why the code seems to be not working. I tried to use
UPDATE ... SET ...WHERE ..
function but I don't know why it doesn't allow me to do that (is that because my code is written in C# but not PHP?)
Here is the code for edit user profile: (srpassword is the name of the password column, password is the new one user typed in)
public static bool EditUserInfo(string username, string password)
{
string query = "SELECT REPLACE([srpassword], [srpassword], 'password')
FROM usertb WHERE srusername = '" + username + "'";
accessDB dbaccess = new accessDB();
return dbaccess.saveData(query);
}
Hope somebody can help me