php header redirect not working

demedici

New Member
I'm using an ajax call to trigger a php redirect using headers. According to chrome's developer tools the content of the page is loaded (ie: is in the resource list), but the page never redirects.I'm not getting any error codes. Here's the php: \[code\]<?php ini_set('display_errors', false); if (!isset($_SESSION)) { if($_POST['email']){ ...several calls to external db... if(strlen($response->supporter->item->Email)) //user is a member header('Location: http://www.example.com/page-one/'); else header('Location: http://another-site.com/'); }}?>\[/code\]Nearly exactly the same code works in another part of the site. Any ideas why this is pulling the correct content, but not loading it on the page?the ajax call is:\[code\]$.post("http://www.our_site.org/is_member.php", { email: email });\[/code\]
 
Back
Top