Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<?php include('aes.php')?>

<?php
require("includes/conn1.php");


error_reporting(0);
$workingKey='asdf4asdf5asdf4asdf5asdf4a';		
$encResponse=$_POST["encResponse"];			


$rcvdString=decrypt($encResponse,$workingKey);		


$decryptValues=explode('&', $rcvdString);
$dataSize=sizeof($decryptValues);

/*echo "<center>";
echo "<table cellspacing=4 cellpadding=4>"; 
*/for($i = 0; $i < $dataSize; $i++) 
{
	$information=explode('=',$decryptValues[$i]);
/*    	echo '<tr><td>'.$information[0].'</td><td>'.$information[1].'</td></tr>';
*/		
		$ar[]=$information[1];
		
}
 
 
for($i = 0; $i < $dataSize; $i++) 
{
if($ar[$i]=='') { $ar[$i]="null"; }

}



$sql=pg_query("insert Statement here");


if($ar[3] == 'N')
 
   print "<script language="Javascript">document.location.href='http://abc.in/index.php' ;</script>";
 
else
 
  print "<script language="Javascript">document.location.href='http://abc.in/index2.php' ;</script>";
 

exit;

?>



here from the above code we need to redirect page depending on " $ar[3] == 'N' " then abc.in if not xyz.in

we are not able to redirect, till insert statement it is working fine after inserting it is not redirecting at all sometimes we get " parse error syntax error unexpected t_string "

please help with redirection code Thanks in advance
Posted
Comments
Killzone DeathMan 6-Jan-14 7:19am    
LOL, of course there will be the error "parse error syntax error unexpected t_string ", please see the following code:

print "<script language="Javascript">document.location.href='http://abc.in/index.php';</script>";

Must better be:

echo "<script language=\"Javascript\">document.location.href='http://abc.in/index.php';/script>";

Or it can be:
?><script language="Javascript">document.location.href='http://abc.in/index.php';/script>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900