passing value to another page using javascript
<p>Hello every I want to pass a message from php to JavaScript function and then  redirecting to another page i want to show that message . Plz help me out . here is the sample code</p>

<pre><code>Php 
if ($result){
$success = "New Page has been added successfully.";
} else {
$error = "Unable to process at this time.";
}

Java script 

&lt;script type="text/javascript"&gt;
window.location="admin.php?page=add_user";
&lt;/script&gt;
</code></pre>

<p>i want this &amp;success message on another page by  using this javascript function . i have tried in this way </p>

<pre><code>window.location="admin.php?page=add_user&amp;&lt;?php echo $success?&gt; ";
</code></pre>
