hellow
every body, script is giving error for the following code $link = "<a href="reset-password.php?ui=$row['user_id']&ak=$upassword">Reset the Password </a>"; i have tried variables with quotes as well but result is sme.
the error is following
"Parse error: syntax error, unexpected T_STRING in C:\wamp\www\ProTest\password-forget.php on line 26"


secondly update query also giving an error

$update-password = mysql_query("update tbl_auth_user set user_password ='$upassword' where user_id = '$row['user_id']'") 
                        or die("Password reset failed");

the error is following
"Parse error: syntax error, unexpected '=' in C:\wamp\www\ProTest\reset-password.php on line 21"

Recommended Answers

All 3 Replies

$link = "<a href='reset-password.php?ui={$row['user_id']}&ak=$upassword'>Reset the Password </a>";

$update_password = mysql_query("update tbl_auth_user set user_password ='$upassword' where user_id = '{$row['user_id']}'") or die("Password reset failed");

thank you pritaeas, but problem is at its same place, any other method please, your sugesstions are always valueable.

Try this.

$link = "<a href=reset-password.php?ui=".$row['user_id']."&ak=".$upassword.">Reset the Password </a>";

and
$update-password is not a valid variable name. You can't use -. More about it here.
http://in.php.net/language.variables
So, your update query should be like this.

$update_password = mysql_query("update tbl_auth_user set user_password ='$upassword' where user_id = '".$row['user_id']."'") or die("Password reset failed");

Cheers,
Naveen

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.