Passing the upated value in html hidden input[Solved]
<p>i am making a project regarding about online examination in which admin can be able to add test and after that it will show it in the div. Inside the div it will show all the list of selected test and therefore, he can be able to delete any test by simple clicking a cross sign. So, i am  stuck in the process in which if i am deleting any test and after that i am submitting a form then it is showing me all the test including the deleted test. BElow are my code:-</p>

<pre><code>&lt;?php  
    if(isset($_POST['addTest']))
    {  
        echo "&lt;br&gt;";
        echo "SELECTED TEST LIST";
        echo "&lt;br&gt;";
        echo '&lt;div style="backfround:white;padding:5px;border:2px solid;overflow:scroll;height:100px;"&gt;';
        $fruitList = implode(', ', $_POST['jdb']);
        $jdStore = explode(',',$fruitList);
        $jdValueStore = ""; 

        for($i=0;$i&lt;count($jdStore);$i++)
        {
            $testShowState = "select testId, testName from test where testId= '$jdStore[$i]'";
            $testShowQuery = mysql_query($testShowState);
            $testShowFetch = mysql_fetch_array($testShowQuery);

            echo  $jdValueStore[] =  "&lt;div class='divClass'&gt;

                                          &lt;p&gt;".$testShowFetch['testName']."&lt;/p&gt;
                                          &lt;img src='images/deletebttn.gif' alt='delete' class='deleteDiv' /&gt;
                                      &lt;/div&gt;";
        }

        echo '&lt;/div&gt;';
    } 

    $jdTotal = serialize($jdValueStore);
    $encoded = htmlentities($jdTotal);

?&gt;
&lt;input type="hidden" name="jdStoreValue" value="&lt;?php echo $encoded; ?&gt;"&gt;
&lt;input type="submit" class="button add" value="Save" style="width:auto;" id="addSave" onclick="myAddSave()" name="myAddSave" &gt;
</code></pre>

<p>On The page where i am getting the values:-</p>

<pre><code>$jdStoreValue = unserialize($_POST['jdStoreValue']);

for($i=0;$i&lt;count($jdStoreValue);$i++)
{
    echo $jdStoreValue[$i];
}
</code></pre>

<p>It is showing me all the test. I dont want a deleted test. Any Helps would be appreciated the most</p>
