Help With JavaScript Alert
<pre><code>function msg ($msg) {

 echo "&lt;script type='text/javascript'&gt;alert('$msg');&lt;/script&gt;";


}

if (count($_POST)) {
   msg('TEST!!!!!');
}

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;My website&lt;/title&gt;
&lt;link rel="stylesheet" type="text/css" href="/assets/css/main.css" /&gt;   
&lt;/head&gt;
&lt;body&gt;

&lt;div id="content"&gt;
&lt;form action="/user/register" method="post"&gt;

&lt;table cellspacing="2" cellpadding="0"&gt;
&lt;tr&gt;

 &lt;td&gt;Username:&lt;/td&gt;
 &lt;td&gt;&lt;input name="username" maxlength="25" size="25" type="text" /&gt;
 &lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
 &lt;td&gt;E-mail:&lt;/td&gt;
 &lt;td&gt;&lt;input name="email" maxlength="255" size="25" type="text" /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
 &lt;td&gt;Password:&lt;/td&gt;
 &lt;td&gt;&lt;input name="password" maxlength="255" size="25" type="password" /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
 &lt;td&gt;Confirm password:&lt;/td&gt;
 &lt;td&gt;&lt;input name="password2" maxlength="255" size="25" type="password" /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;

 &lt;td&gt;&amp;nbsp;&lt;/td&gt;
 &lt;td&gt;&lt;input type="submit" value="Register" /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;&lt;/div&gt;

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

<p>When I post it doews show the alert but on a blank page. The form vanish when i press submit. How can I do so it still shows the the html?</p>

<p>The message pops up but on a blank page. I want it to still show the page your on</p>
