redirecting to page with ID in the URL
I have a generic contact form in a shared file which appears on multiple pages on a site. It works fine apart from on one of the pages which is a dynamic page in the format 'people.php?ID=1". On successful submission, the page displays a success message and the redirect is set up as follows:
$GoToPage = "$pageName?sent=true#success"; $RecipArray = array();
I need to retain the ID in this though, so that the page displays properly. I tried this:
$GoToPage = "$pageName?ID=($row_rsPractitioners'[ID'])&sent=true#success"; $RecipArray = array();
$GoToPage = "$pageName?ID=($_GET'[ID'])&sent=true#success"; $RecipArray = array();
but neither carries the ID into the URL - the result is this:
How do I get the page to appear as 'people.php?ID=1&sent=true#success' ?
Furthermore, if I can get that working, how would I include an IF statement around the ID to only show an ID if it exists, so that I can then continue to use the email script in the shared file rather than having a separate one on this page? Thanks!