Get variable from query string
<p>I was trying to get variable in Query String from URL. But somehow, its just got one variable instead of getting all variables from querystring. I really don't know what goes wrong with my code. Here is the code I want to print out error from the invalidate form:</p>

<pre><code>&lt;?php       
            displayForm();
            function displayForm(){
                ?&gt;                    
                &lt;form action="./prod_add_action.php" method="post" name="addproductForm"&gt;
                    &lt;fieldset&gt;
                        &lt;legend&gt;Online Ordering System Setup&lt;/legend&gt;                        
                        &lt;label for="product_name"&gt;Product Name: &lt;/label&gt;&lt;input type="text" name="product_name" value="" /&gt;&lt;?php echo $_GET["name_error"]; ?&gt;
                        &lt;label for="product_date"&gt;Product Date: &lt;/label&gt;&lt;input type="text" name="product_date" value="" /&gt;&lt;?php echo $_GET["date_error"]; ?&gt;
                        &lt;label for="product_price"&gt;Product Price: &lt;/label&gt;&lt;input type="text" name="product_price" value="" /&gt;&lt;?php echo $_GET["price_error"]; ?&gt;
                        &lt;input name="add_button" type="submit" value="Add" /&gt;
                        &lt;input name="reset_button" type="reset" value="Clear" /&gt;
                    &lt;/fieldset&gt;
                &lt;/form&gt;
                &lt;?php
            }
            ?&gt;
</code></pre>

<p>And here is the code I created the querystring:</p>

<pre><code>$query_string = "name_error=" .urlencode($name_error) ."&amp;amp;date_error=" .urlencode($date_error) ."&amp;amp;price_error=" .urlencode($price_error);
            header("Location: ./prod_add.php?$query_string");
            exit();             
</code></pre>

<p>In the first code, the page only print the first $_GET['name_error'], while it should be include $_GET['date_error'] and $_GET['price_error. ']
This is the address:</p>

<blockquote>
  <p><a href="http://example.com/prod_add.php?name_error=Product+name+must+be+characters+only&amp;date_error=Product+date+must+be+input+as+this+formate+DD-MM-YYYY&amp;price_error=Product+price+must+be+float+number+only" rel="nofollow">http://example.com/prod_add.php?name_error=Product+name+must+be+characters+only&amp;date_error=Product+date+must+be+input+as+this+formate+DD-MM-YYYY&amp;price_error=Product+price+must+be+float+number+only</a></p>
</blockquote>
