Welcome Guest, Not a member yet? Register   Sign In
Array element issue
#11

[eluser]Pert[/eluser]
If that is your actual code, then there is an issue.

Code:
if ($useractivatedgetdatabase = 1)
{
   ...
}

This code will set $useractivatedgetdatabase always to 1 and returns true (in other words it will always run the code in the following block.

Code:
if ($useractivatedgetdatabase == 1)
{
   ...
}

This code will check if your variable value equates to 1, so it could be integer (1), float (1.0), string ( '1') etc.

Code:
if ($useractivatedgetdatabase === 1)
{
   ...
}

Will check if your value is integer 1.

So you have to have double equals signs in IF statement.




I did notice you are doing this

Code:
$passwordgotdatabase=$this->db->query($passwordget,$emailentered);
$passworddecrypted=$this->encrypt->decode($passwordgotdatabase);

<b>$passwordgotdatabase</b> is not actually a value, it's a query object. This is probably what you should do:

Code:
$passwordgotdatabase = $this->db->query($passwordget, $emailentered);
$passworddecrypted = $passwordgotdatabase->num_rows ? $this->encrypt->decode($passwordgotdatabase->first_row()->password) : '';
#12

[eluser]Xeroxeen[/eluser]
Finally solved the issue Big Grin Issue was i have to write $passwordgotdatabase->first_row() instead of $passwordgotdatabase->row() Hope it'll be help for some other guy who faces to my issue Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB