10-22-2011, 04:24 AM
You have your editor.php, and then you have the line in code;
This will only work if you press "Submit" on editor.php, however you have another form on editpage-2.php which does submit to it self, $_SERVER['PHP_SELF'], but there is NO $_POST['page'] within this form, therfore you get an error "Undefined index: page"
The code I posted works as intended too, and if it's not what you want then read about using sessions and checking $_POST.
PHP Code:
$firstfile = $_POST['page'];
The code I posted works as intended too, and if it's not what you want then read about using sessions and checking $_POST.