• Resolved amarie

    (@tuesdave)


    Hello.

    I’m trying to access $_POST data from my custom fields.

    For instance, if my field is called wpcf-clinic-name in the database, with an input name of wpcf[clinic-name], then…

    $_POST['wpcf[clinic-name]'] would be the correct way to access this value, right?

    Am I not using the correct input name, because this isn’t working.

    https://ww.wp.xz.cn/plugins/types/

Viewing 1 replies (of 1 total)
  • Dear tuesdave

    No. It is wrong.

    Correct way is:

    $_POST['wpcf']['clinic-name'];

    You can “debug” $_POST like this:

    echo '<pre>';
    print_r($_POST);
    echo '</pre>';

    Cheers,
    Marcin

Viewing 1 replies (of 1 total)

The topic ‘access $_POST variables’ is closed to new replies.