Simple PHP Notepad

Created Wednesday 19 June 2019

code below

<html>
<body>
<h1> notepad for me</h1>
<form name="form" method="post">
<textarea style="width:80%;height: 20%;font-size:26pt;" name="text_box"></textarea>
<br>
<input style= "color:red; width:80%;height: 60%" type="submit" id="search-submit" value="notepad" />

<?php
$text1=$_POST["text_box"];

$text="$text1
";

$myFile = "./notepad.txt";

if (isset($_POST["text_box"])) {
	$fh = fopen($myFile,'a') or die("can't open file?");
	fwrite($fh,$text);
	fclose($fh);
	echo "<br><i> $text </i> added to $myFile";
} else {
	echo "<br>hey, say something";
}

?>


Backlinks: FSU Courses:LIS5367:Older Material:Project Roadmap and Resources FSU Courses:LIS5367:Older Material:Project Ideas