Jump to content

Can't Use Function Return Value In Write Context In


azraelGG

Recommended Posts

im trying to build simple login form with some if functions(currently without database) but i got stuck on line 77

if (isset($korisnickoIme)!=='admin' && isset(sha1($lozinka))!=='7110eda4d09e062aa5e4a390b0a572ac0d2c0220') {
 echo "Molimo unesite ispravne podatke.";
   }

 

when i erase isset from isset(sha1($lozinka)).... then it works but i get error for variable not defined - any ideas?

call if you need all code but rest of it works fine (notice that i have isset at $korisnickoIme and there it works

You can't pass a sha1() into isset() as a parameter. As isset is a check in it's self I would give it it's own space in the if conditional, which should remove your problem aswell. i.e.

if ((isset($korisnickoIme) && $korisnickoIme !=='admin') && (isset($lozinka) && (sha1($lozinka) !== '7110eda4d09e062aa5e4a390b0a572ac0d2c0220')) {

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.