# Making a document editor \[php\] troubles

**URL:** <https://forum.kirupa.com/t/making-a-document-editor-php-troubles/234606>\
**Category:** Uncategorized\
**Created:** [August 3, 2007, 5:46pm UTC](https://forum.kirupa.com/t/making-a-document-editor-php-troubles/234606 "2007-08-03T17:46:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [August 3, 2007, 5:46pm UTC](https://forum.kirupa.com/t/making-a-document-editor-php-troubles/234606/1 "2007-08-03T17:46:11Z")

</div>

Ok here is what i trying to do:

1. User enters the document name and extenstion he/she wants to edit,
2. PHP takes it via variables to edit.php,
3. user clicks submit on edit.php and is taken to done.php with confirmation and echo of new content.

how im doing this is file\_get\_content.  
Here i the code for edit.php and done.php:

EDIT.php

```php

<?php
//define name:
$name = $_POST['name'];
//define ext:
$ext = $_POST['ext'];

/*------------------------------------------------------*/
//Grab the file:
$content = file_get_contents($name . $ext)
?>

<form name="form1" method="post" action="done.php">
  <p>
    <input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $name.$ext; ?>">
  </p>
  <p>
    <label>
    <textarea name="edited" id="edited" cols="80" rows="25"><?php echo $content; ?></textarea>
    </label>
  </p>
  <p>
    <label>
    <input type="submit" name="button" id="button" value="Edit : <?php echo $name.$ext; ?>">
    </label>
  </p>
</form>

```

DONE.php

```php
 <?php

//defines
$text = $_POST['edited'];

echo $text;

?>

```

I used echo before I did file\_put\_contents so i know it will work.

But it doesn’t. All I get is a blank page.

Whats happening?!
