php中提示Undefined index的解决方法

php中报错:Undefined index。

解决方法:

在变量前面 加上一个 @ ,如

if (@GET['action']=='save') { ...