Notice: Undefined index: action in /opt/lampp/htdocs/contacts.php on line 6 : <p>I was developing one simple PHP script in window machine and was testing in xampp. I have completed it and its working fine in my windows machine. Now I have tried to move it in my centos 7 machine which also have xampp. Its giving me error like below</p>

<pre><code>Notice: Undefined index: action in /opt/lampp/htdocs/contacts.php on line 6
</code></pre>

<p>My code for that function is like below</p>

<pre><code>if($_GET['action']=="change_status" &amp;&amp; $_GET['contact_id']&gt;0 )

    {
        $upd_qry = "update contacts set status = ? where id=?";
        $stmt = mysqli_prepare($mysqli, $upd_qry);
        mysqli_stmt_bind_param($stmt, "ii", $_GET['status'],$_GET['contact_id']);
        $result = mysqli_stmt_execute($stmt);
        $_SESSION['msg']="11";
        header( "Location:contacts.php");
        exit;

    }
</code></pre>

<p>I have marked that similar errors in 1-2 more files too. I do not understanding why this happening. I have php 7.2 in my windows machine and in centos its 7.0
let me know if someone know what is wrong with it.
Thanks</p>
