URL redirect
Hi everyone,
I have a page on my site with a series of links that, when clicked, submit to a page (index.php) located in the same directory as itself, eg.
<li id="formal"><?php echo "<a href=\"$url_consumer/index.php?subcatID=6&itemTypeID=1\">Link 1</a>"?></li>
index.php contains only php and basically just queries a database and then loads the information into the current page with the links in it.
This page with all the links in it, also contains a form which when submitted, inserts the information into a database table and is then redirected to the current page:
$WA_redirectURL = "?sent=true";
On this current page, the first 'confirm' paragraph below is supposed to be shown:
<?php if(isset($_GET['sent']) && $_GET['sent'] == "true") { ?> <p id="confirm" style="background-color: #ded5b3; color: #00274c; padding: 5px; margin-bottom: 8px;"> <strong>Thank you – your details have been processed. </strong></p><?php } else { ?>
<p>Subscribe to our newsletter.</p>
<?php } ?>
It doesn't seem to work though because even though it's submitting to itself, it's not loading the current page because it needs certain information in the url string to do this (see the abovementioned link). When the submit button is pressed the following is at the end of the url:
index.php?sent=true
Since index.php is the php page that only queries the database the page shown is blank and not the page that was previously seen, before submitting the form.
I just wondered if anyone knows of a workaround for this problem?
Appreciate any advice.