when you visit this script directly ex: http://www.site.com/xxxxxx/result.php it says:
got code= stored= You'r in <--- it should give them you'r out
can you fix this?
the code is:
<html> <head> <title>Result Page</title> <body> This script was developed by <a href="mailto:yg108@softhome.net">Yuriy Horobey</a>.<br> It is freeware, demonstrating my skills working with PHP, you may use it as you want.<br> <?PHP error_reporting(53); session_start(); echo("got code=$thecode<br>"); $noautomationcode = $HTTP_SESSION_VARS["noautomationcode"]; echo("stored=$noautomationcode<br>"); if($thecode == $noautomationcode){ echo("You'r in"); } else { echo("Grrrr!"); } //or unregister the code 🙂 session_destroy(); ?> </body> </html>
the fact is that both variables are empty and so they are equals.
to prevent this, just put this :
if($thecode == $noautomationcode && $thecode )
that way, it will check that $thecode is not empty.
thank you 🙂