When using $ _GET [] or $ _POST [], sometimes prompted Notice : Undefined index: warning.
Use the following this approach will be very easy to solve this problem:
$var = isset($_GET['username']) ? $_GET['username'] : null;
Reproduced in: https: //www.cnblogs.com/rainman/archive/2009/11/17/1604863.html