I'm just playing around with the form action and php. I'm not good at them, just starting to learn and recently I was playing around with the fopen, fwrite and fclose. Also playing around with basic form filling then php calls out what is filled.
What I'm wondering is, I know fopen, fwrite can be called to open/create a txt file and input simple data entered into the txt file but if I want to do that and also let the user see what they entered.
Not too good with explaining. Let's say for example
a.html --> let's say in this html
<form action="a.php" method="get">
<input type="text" name="name">
<input type="submit">
a.php -->after clicking submit in a.html this a.php will have the code of
echo "My name is $_GET["name"]";
which will show My name is xxxxx after clicking submit in a.html but what if I also want the submit in a.html to go into another let's say b.php and b.php will have the coding such as
$filehandle = fopen("text.txt","a+") or die ("sorry error");
fwrite($filehandle, $_GET["name"]);
fclose($filehandle);
I know if from a.html to go into just one of a.php or b.php then it will work but is it possible to make both a.php and b.php works with just one submit click on a.html?
don't want to involve javascripts and those more advanced because I'm not up to that level yet but I'm just thinking if there's a simple and possible way