Support » Plugins » How to get $_POST data from plugins option page?

  • I’m creating plugin that require to edit/write css to the file.
    here is the code to write to a file.

    $files = $themepath.'/custom/style.css';
    $fp = fopen($files, 'w');
    fwrite($fp, get_option("custom_css"));
    fclose($fp);

    when i use that code, it will write get_option("custom_css") that already saved to the database but not what i recently write to the text area. yes, because its not been saved yet.

    instead of that, i would like to replace with
    fwrite($fp, $_POST['custom_css']);

    but hey, $_POST[‘custom_css’] has no value. print_r($_POST) also return blank. I know it because form action is option.php that is not the current page <form method="post" action="options.php">

    the question is how to get $_POST value from options.php?
    or is there any other smart way to do that?

    thanks for help, sorry for bad english 😀

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get $_POST data from plugins option page?’ is closed to new replies.