display an alert after a user clicks a submit,and comes back after processing in another php page
<p>How can I display an alert or a message after a user clicks a submit button in a form?</p>

<p>I want the alert to show when the page has loaded after the submit button has been clicked.</p>

<p>When submit form is clicked its goes to another php page updated the db and and redirected to the form page itself. I am doing it in PHP. Is there anyway I can post data, check in the form page and display a hidden message?</p>

<pre><code>header('Location: http://www.xxxxxx.co.uk/NottTest/editqr.php');
</code></pre>

<p>This is the redirect link after updating the DB, can I parse a message here?</p>

<p>This is the page where the db is updated ..</p>

<pre><code>&lt;body&gt;

&lt;p&gt;
 &lt;?php $sltdtpst= $_POST["qrtopic"]; ?&gt;
 &lt;?php $selctsm= $_POST["qrsubmenu"]; ?&gt;
 &lt;?php $selcttxt= $_POST["text12"]; ?&gt;

 &lt;?php
$link = mysql_connect('www.xxxxx.co.uk', 'xxxxxx', 'xxxx');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}

mysql_select_db("web3fffasd", $link);

 $update = "UPDATE qr_table SET $selctsm = '$selcttxt' WHERE id_qr= $sltdtpst";

  mysql_query($update, $link);

mysql_close();


header('Location: http://www.xxxxxx.co.uk/NottTest/editqr.php');

?&gt;


&lt;/p&gt;

&lt;/body&gt;
</code></pre>

<p>So after updating the database a hidden should be displayed here in the form page</p>

<pre><code>&lt;form name="updateqrnew" form action="edider1.php" onsubmit="return validateForm()" method="post"&gt;

    &lt;div class="form_description"&gt;
            Update Contents for QR below
&lt;/div&gt;                      
            &lt;ul &gt;

                    &lt;li id="li_2" &gt;
        &lt;label class="description" for="element_2"&gt;Quick refresher topics &lt;/label&gt;
        &lt;div&gt;
        &lt;select class="element select medium" id="qrtopic" name="qrtopic"&gt; 
            &lt;option value="" selected="selected"&gt;&lt;/option&gt;
&lt;option value="1"&gt;Anxiety&lt;/option&gt;

        &lt;/select&gt;
        &lt;/div&gt; 
        &lt;/li&gt;       &lt;li id="li_3" &gt;
        &lt;label class="description" for="element_3"&gt;Submenu &lt;/label&gt;
        &lt;div&gt;
        &lt;select class="element select medium" id="qrsubmenu" name="qrsubmenu"&gt; 
            &lt;option value="" selected="selected"&gt;&lt;/option&gt;
&lt;option value="start_of"&gt;Starting off&lt;/option&gt;


        &lt;/select&gt;
        &lt;/div&gt; 
        &lt;/li&gt;       &lt;li id="li_4" &gt;
        &lt;label class="description" for="element_4"&gt;Enter the article below&lt;/label&gt;
        &lt;div&gt;
            &lt;textarea id="text12" name="text12" class="element textarea medium"&gt;&lt;/textarea&gt; 
        &lt;/div&gt; 
        &lt;/li&gt;

                    &lt;li class="buttons"&gt;
                &lt;input type="hidden" name="form_id" value="431595" /&gt;

                &lt;input id="saveForm" class="button_text" type="submit" name="submit" value="Update" /&gt;
        &lt;/li&gt;
            &lt;/ul&gt;
    &lt;/form&gt;
</code></pre>
