The following php is used to redirect the user of an email form if the email address does not meet the syntax. // Subscription request from a subscription form (in page or widget), can be // a direct subscription with no confirmation if ($action == 's') { if (!newsletter_is_email($_REQUEST['ne'])) { $url = "http://www.ace4space.com/content/subscription-error/"; $content = file_get_contents($url); echo $content; } Unfortunately this produces an error where the user is taken to the correct URL HOWEVER; The initial page is displayed BELOW the new URL contents? Any idea on how to redirect the user to a fresh page showing the subscription error page ONLY without the referring page below it... Please view any page @ http://www.ace4space.com and enter a NON formated email address to be sent to http://www.ace4space.com/content/subscription-error/ and see what I mean! Its annoying me! Why won't the http://www.ace4space.com/content/subscription-error/ page just display the content of http://www.ace4space.com/content/subscription-error/?
use header('Location: http://redirected.site.com/page.html'); exit(); to redirect users to the specified page
If you haven't passed headers do what JAY6390 said, if not try: // Subscription request from a subscription form (in page or widget), can be // a direct subscription with no confirmation if ($action == 's') { if (!newsletter_is_email($_REQUEST['ne'])) { $url = "http://www.ace4space.com/content/subscription-error/"; echo "<SCRIPT LANGUAGE=javascript>window.location='$url'</SCRIPT>"; exit(); } PHP: