Jump to content

Show files in page


ngreenwood6

Recommended Posts

<?php

if (isset($_POST['submit'])) {
file_put_contents('test.php', $_POST['textarea']);
header("Location: edit.php ");
} else {

$index = file_get_contents("test.php");

?>

<html>
<title>Read Data</title>
<form name="change" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<textarea name="textarea"  cols="80" rows="20"><?php echo htmlentities($index); ?></textarea>
<input type="submit" name="submit">
</form>
</html>
<?php
}
?>

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.