Php side server programming language
<!doctype html>
<html>
<head></head>
<body>
<h1>Astron nDaniel</h>
<?php
echo "speaking to the Astron ";
echo"
<strong>Hello Astron</strong>";
$file=fopen("dan.txt","w"
$txt="Hello text file";
fwrite($file,$txt);
$dt="
this will be the beginning
now i can get user imput stored or writen
on a text file and then will soon be sent
to my email";
fwrite($file,$dt);
fclose($file);
?>
<?php
if(isset($_POST['text'])) {
$name = $_POST['text'];
$handle = fopen('names.txt', 'a';
$tj="Name: ";
fwrite($handle, $tj);
fwrite($handle,$name."
"
fclose($handle);
}
?>
<form method="post">
Name: <input type="text" name="text" />
<input type="submit" name="submit" />
</form>
<h1>
<?php
$read=file("dan.txt"
$count=count($read);
$i=1;
foreach($read as $line){
echo $line;
if($i<$count){
echo ".";
}
$i++;
}
?>
</h1>
<i>
<?php
if(isset($_POST['text'])) {
$read=file("names.txt"
$count=count($read);
$i=1;
foreach($read as $line){
echo $line;
if($i<$count){
echo ".";
}
$i++;
}
}
?>
</i>
</body>
</html>