次の 2 つの単純なスクリプトがあります。$action が「未設定」として検出されています。isset ステートメントが使用されていない場合、「Undefined variable $action」という警告がポップされます。何が問題なのかわかりません、助けてください。
prog01.html :
<a href="prog02.php?action='add'">Press to add record</a>
prog02.php :
<?php
if (isset($action)){
if ($action == 'add') echo "action is to add <br>";
}
else
echo "\$action is not set <br>";
?>