This is code from ajax script, after computing through all the necessary conditions $n and $view are created and displayed with the following code
<?php
//ajax conditions
?>
<data>
<handler value="show_view"/>
<item id="view<?php echo $n;?>"
value="<?php echo rawurlencode($view);
if (strpos($s,'invalid') !== false)
{
echo "Hit Invalid";
$url = $_SERVER['HTTP_REFERER'];
header( "Location: $url" ); //<--not working
exit;
}
?>"/>
<item id="end" value=""/>
</data>
I have $s in script..all i want to do is redirect script if the variable $s in invalid..script works fine but redirect doesn't work. Please suggest some solution to this problem. Thanks in advance.