Dynadot โ€” .com Registration $8.99

PHP Notice [error]

Spaceship Spaceship
Watch
Impact
19
Hey
when i turn the Error reporting on i get this error :
Code:
Notice: Undefined index: action in C:\Program Files\xampp\htdocs\FM\include\template\right.inc.php on line 17
and heres that line:

$action = htmlspecialchars($_GET['action']);

why does it say "Undefined index" ?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Seems like $_GET['action'] isn't defined. You can really turn off notice errors until you are having problems with your script. They normally just say things that don't really matter at all.
 
0
•••
well i am having a small problem so i turned it on..it wont add the comment to the database..and it wont give any error either :S even tho the error reporting is on..kinda confused but if its not that..then i duno hmm
 
0
•••
If you have a larger problem as you described unknowngiver, post some more code :)
 
0
•••
opsi:p nvm fixed it..thanks :) [i didnt make the "id" auto_incremement..so it was finding a duplicate there..lol]
Thankss tho...and does this "Notice" matter at all?
 
0
•••
It doesn't really matter at all and would make no difference if you turned notices off.

This would get rid of the notice:
if (isset($_GET['action'])) $action = htmlspecialchars($_GET['action']);
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back