ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

$_POST variables not being sent

December 03, 2012 10:35am

Subscribe [1]
  • #1 / Dec 03, 2012 10:35am

    nvaughan

    1 posts

    Hi,

    I have a weird problem in that $_POST variables aren’t being sent when submitting a form.

    The form has method=“post” but when I attempt to get the variables nothing is returning. I’ve tried:

    <?
    print_r($_POST);
    ?>

    and

    <?
    echo $_POST['field_name'];
    ?>

    In the first case an empty array is returned and nothing is returned in the second.

    I’ve also tried echo $this->EE->input->post(‘field_name’); and still no joy.

    PHP parsing is enabled and I can’t see any other errors.

    Has anyone experienced anything similar?

    Cheers

     

  • #2 / Dec 03, 2012 11:01am

    nvaughan

    1 posts

    Solved it 😊

    I was redirecting non-www to www (via htaccess) but the form was posting to the non-www version which seemed to be causing the POST variables not to get posted on the www version!!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases