Under $ _ GET [], $ _ POST [] mark question: PHP

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

Guess you like

Origin blog.csdn.net/weixin_34232363/article/details/93561263