|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
after login
i have set cookies after user login and get their login info.....
then i have a function that user can update their data..... but i failed to do that...... i have use cookies and get user info from database......but when user update their info......database is still the old info.....it didnt change anything, the code is like that: note: "visitor" is cookies as user login email <? if ($visitor){ mysql_connect("localhost", "root"); mysql_select_db("applicant") ; $result = mysql_query("select * from applicant_profile where ae_mail='$visitor'"); if ($Submit){ if ($password==$confirm){ $sql = "UPDATE applicant_profile SET a_password='$password', a_name='$name', a_address='$address', a_phone='$phone', a_salary='$salary' , WHERE ae_mail=$email"; $result = mysql_query($sql); ?> <h3> successfuly update </h3> <?php } else { echo"password mismatch"; } } } ?> |
|
#2
|
|||
|
|||
|
RE: after login
are you resetting the cookies after they update their info?
|
|
#3
|
|||
|
|||
|
RE: after login
how it resetting? what i need to do and get the cookies again?
|
|
#4
|
|||
|
|||
|
RE: after login
its not to do with cookies
your query had an error in it, try this instead $sql = "UPDATE applicant_profile SET a_password='$password', a_name='$name', a_address='$address', a_phone='$phone', a_salary='$salary' WHERE ae_mail=$email"; |
|
#5
|
|||
|
|||
|
RE: after login
i already del the comma, also cannot worked it.....i already spend a lot of time debug it, still can't get this......anybody help me?
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > after login |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|