<?php
if(isset($_POST['submit'])){
$file="get.php"开发者_运维问答;
$open = fopen($file, "a+"); //open the file, (get.php).
fwrite($open, "Name: " .$_POST['user'] . "/n"); //print / write the name.
fwrite($open, "Colour: ". $_POST['color'] . "/n"); //print / write the colour.
fclose($open); //close the opened file
echo "Log File Entry Had Been Made";
}
?>
But The Output is written to get.php as -> /nName: The Name Posted/nColour: Colour Posted/n Please help if you have time, Thanks All.
The character is "\n", not "/n". Just replace that, it'll work.
精彩评论