I've got a website and I want to ask my visitors how they found my website. So I wrote this script (see below), but I want that a new page is displayed once the visitors click on the submit button saying e.g., "thank you for the answer or something like that. how do I do that?:
<?php
$weopenfile = fopen("alternative.txt", "a+");
fputs ($weopenfile, $answer2."\n");
#fclose($fp);
#$fd = fopen ("alternative.txt", "r");
#$contents = fread ($fd, filesize ("alternative.txt"));
#fclose ($fd);
echo "<font size=\"$fontsize\" face=\"$font\" color=\"$textcolor\"><form method=\"post\" action=\"$PHP_SELF\"><p align=\"left\">";
echo "<input type=\"text\" name=\"answer2\" size=\"20\">";
echo "<p align=\"left\"><input type=\"submit\" name=\"Submit\" value=\"Submit\"></p></form></font>";
?>
or maybe there is a better possibility than the one above, please post if you have a suggestion.