Install Php and Uhttpd

nano /www/saveinput.php
$file = 'people.html';
// Open the file to get existing content
$current = file_get_contents($file);
// Append a new person to the file
$current .=$_GET["name"]."\n";
//$current .= "John Smith\n";
// Write the contents back to the file
file_put_contents($file, $current);
echo "data saved";
<p><a href="/people.html">View Result</a></p>
<p><a href="/inputform.html">Input More</a></p>
touch /www/people.html
nano  /www/inputform.html
<!DOCTYPE html>
<form action="saveinput.php" method="get" target="_blank">
  Name: <input type="text" name="name"><br>
  <input type="submit" value="Submit">
<p>Click on the submit button, and the input will be sent to a page on the server called "saveinput.php".</p>
<a href="/people.html">View Result</a></p>

open ""  to input data.



Comments powered by CComment