firstly, your query's aren't executing, you've just set up the variables, you need to use mysql_query() or similar function depending on what database you're using
adding an or die(mysql_error()) statement to the query for troubleshooting is helpful
your "else" statement in user/pass is missing brackets (should look similar to: } else {)
your else statement in update pin is running off of no if or similar statement... and you have a single } close bracket doing nothing there
you should escape data inserted into database with mysql_real_escape_string()
you should be verifying your data, making sure fields aren't empty, proper characters are/nt in place etc.
you should use some form of hash+salt to hash the passwords to kept them private and safe
your update statements should use a unique id as the WHERE clause, instead of user/pass match and oldpin's as you have no check for duplicate entries, etc.
your query column=$value should be more like column='".$value."' or column='{$value}'
lastly, please make better titles for your threads.
..you may want to look at small tutorials on the web that go over each step to do small php/database scripts like http://www.w3schools.com/PHP/
(note: I'm amateur, please anyone correct me if I pointed out something wrong)