Jump to content

Recommended Posts

I have been working debugging a site for quite some time and i have a parse error in this function that i cant solve.

in a nutshell the function recieves post data then verifys that data was sent from user and then the part with the error is an if/then statement that is supposed to

determine if no new username was entered => change the mysql command approapiatly

else

check that the current username is not the same and the new => error out

otherwise change the mysql command to include the new username

then display status output

here is the code can any one please help find the error

 

//********************************

if (!isset($newuname){

  $updatelogin = "update users set password=md5('$password'), question='$question', answer='$answer' where username='$uname'"

}else{

if ($currentuname == $newuname){

error("Your New Username Cannot Be The Same As The Old Username");

//update with the username

}else{

$updatelogin = "update ignore users set username='$newuname', password=md5('$password'), question='$question', answer='$answer' where username='$uname'"

}}

$status = getemsql($updatelogin, 'accounts');

 

if (!$status}{

error("An Error Has Occured Please Try Again.");

}else{

status("Login Information Updated, Please Logout and Login to Finish Update");

}

//*************************

 

btw the error function is a js popup that goes back to form and the status function is the same popup that does not go back

 

 

thanks in advance

-scott-

Link to comment
https://forums.phpfreaks.com/topic/63450-parse-error/
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.