Remove parameters from URL and paste finished string to address bar
<p>I am new to php and I would appreciate any help you could offer. I wish to remove the parameters from a URL. I can remove them using the code below but my question is how can i parse the result into the address bar. I don't want to reload the page via <code>header("Location: index.php")</code> because i lose the use of the parsed variable. I have looked at other questions but they do not tell you how to parse to finished string into the address bar. Here is my code below. </p>

<pre><code>&lt;?php
if($_REQUEST["add"])
{
    $message = "Item has been added";
    $url = $_SERVER['REQUEST_URI'];
    $url = strtok($url, '?');
}
?&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php
echo $message;
?&gt;
&lt;a href="?add=item"&gt;Click Add&lt;/a&gt;
</code></pre>

<p></p>
