PHP Notice [error]

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
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
Close
If you have a larger problem as you described unknowngiver, post some more code :)
 
0
Close
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
Close
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
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back