• Undefined indexes on UGB-Module/Bans Page
    2 replies, posted
[B]I had posted in this thread:[/B] [url]http://facepunch.com/showthread.php?t=1300982&p=46826699#post46826699[/url] But thought maybe someone in the Web Development area could help. [B]No idea why I am getting these errors:[/B] [url]http://frustratedgamers.com/bans/[/url] [B]I have referenced this:[/B] [url]http://php.net/manual/en/language.types.array.php[/url] I'm using PHP 5.5 and MariaDB, not sure if I'm just overlooking something or what but would definitely appreciate some help!
Just gonna reference my reply i just made in the other thread. [QUOTE=TrinityX;46829533]You have to check if it exists before trying to check what type it is - or before trying to use it at all. Undefined index 'p' means $_GET['p'] is not defined. 'p' is an index of $_GET.[/QUOTE] [editline]31st December 2014[/editline] To help others who might view this thread later, i'll post what was the problem (we talked on steam). Always check if a variable exists before trying to use it in PHP, if not you'll get a nasty error. In order to do check if a variable exists, you simply do this: [CODE]if( isset($some_variable) ) { echo 'it exists!'; }[/CODE]
Thread can be closed :)
Sorry, you need to Log In to post a reply to this thread.