I have a cancel membership section which is only available to users who are logged in.
In order to cancel your membership, users must fill in the form which consists of their username and password.
This then checks the username and password that they entered in the form against the session variables username and password (username and password of the person logged in). It seems to work fine if the username and password are the exact same but if they are different it doesn’t work
e.g i’ve set up two accounts using the details below
username: [B]peter [B]peter
username: [B]john[B]simon
So i have:
[code=php]$username = $_POST[‘username’]; // gets username from the form
$password = $_POST[‘password’]; // gets username from the form
$susername = $_SESSION[‘my_array’][0]; // username of person logged in
$spassword = $_SESSION[‘my_array’][10]; // password of person logged in
Here is the code i have:
[code=php]if ($username == $susername & $password == $spassword)
{
Can anyone see why this is not working