I have the following issue. I collect some user input and then write it to a text file using PHP. After this is done I want to redirect to another web page – here http://www.google.com. I am having difficulty.
$myFile = "testFile.txt";
$fh = fopen($myFile, 'a');
$IP = $_SERVER["REMOTE_ADDR"].',';
$logdetails= $IP.date("F j, Y, g:i a O T");
$stringTimeout = $_POST['_delay'];
$stringData1 = $_POST['userChoices'];
$s = ',';
$postData = $s.$stringTimeout.$s.$stringData1"\n";
fwrite($fh,$logdetails.$postData);
fclose($fh);
header("Location: http://www.google.com");
what if you try your redirect part first in another PHP.
divide and conquer! 🙂
hey and If that does not work, check your html headers, I remember that I had issues with the html headers trying to use:
header(“Location: http://www.google.com“);