Jump to content

Add number


Linjon

Recommended Posts

I have some more questions but i will write these here.

 

How can i edit php file via php?

 

<html>
<body>
<form method="post">
<table>
<tr><td>Age:</td><td><input type="text" name="age"></td>	</tr>

<tr><td><input type="submit" value="Submit" name="submit"></td></tr>
</table>
</form>
</body>
</html>
if (isset($_POST['submit']))
{
$myFile = "oldfile.php";
$fh = fopen($myFile, 'w') or die("can't open file");
$age = $_POST['age'];
fwrite($fh, $access);
fclose($fh);
echo "Done!";
}
?>

Example: in oldfile.php should have age = "24"

Link to comment
https://forums.phpfreaks.com/topic/239828-add-number/#findComment-1231976
Share on other sites

Nah, can do it here too :)

 

So, anyone know how to make that?

 

I have some more questions but i will write these here.

 

How can i edit php file via php?

 

<html>
<body>
<form method="post">
<table>
<tr><td>Age:</td><td><input type="text" name="age"></td>	</tr>

<tr><td><input type="submit" value="Submit" name="submit"></td></tr>
</table>
</form>
</body>
</html>
if (isset($_POST['submit']))
{
$myFile = "oldfile.php";
$fh = fopen($myFile, 'w') or die("can't open file");
$age = $_POST['age'];
fwrite($fh, $access);
fclose($fh);
echo "Done!";
}
?>

Example: in oldfile.php should have $age = "24"

Link to comment
https://forums.phpfreaks.com/topic/239828-add-number/#findComment-1232450
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.