• Resolved ftpsportallianz

    (@ftpsportallianz)


    Hello, i try to get the $_SESSION[‘saz’] Variable in the value of the hidden field function.
    But it never give me the right feedback or no feedback.

    What code i need for the value?

    I know that the varibale ist there, for example 4567. I get the feedback outside the form.

    I Try many things.

    <?php $_SESSION[‘saz’]; ?>

    <?php echo $_SESSION[‘saz’]; ?>

    <?php echo $saz; ?> $saz = $_SESSION[‘saz’];

    SESSION:saz

    echo $_SESSION[‘saz’]

    and so on. Nothing works.

    Can anyone help me please! You see i’m not an programmer or coder. But it is the last piece of my puzzle ??

    THX!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hello,

    Can you please clarify what you’re trying to achieve?

    Unfortunately, we cannot provide support for custom coding.

    Regards,

    Thread Starter ftpsportallianz

    (@ftpsportallianz)

    i wanna save an ref code in the hidden field. Like https://www.website.de/?ref=1234

    This Code i want to put in the hidden field with ultimate member. I put the ref, called ‘saz’ on my side, in a $_SESSION[‘saz’]; with this code

    <?php
    $saz = $_SESSION[‘saz’];

    if(isset($_SESSION[‘saz’]) && $_SESSION[‘saz’]) {

    } else {
    $_SESSION[‘saz’] = $_GET[‘saz’];
    }

    So i can get the $_SESSION on every side an wont be lost. But if the member want register then should the hidden field take this as value.

    Thx!

    Thread Starter ftpsportallianz

    (@ftpsportallianz)

    Andthis ist the default hidden field function from the UM Website.

    I put it in the UM/core/action/register.php

    dd_action(‘um_after_register_fields’, ‘add_a_hidden_field_to_register’);
    function add_a_hidden_field_to_register( $args ) {
    echo ‘<input type=”hidden” name=”ref_id” id=”ref_id” value=”<?php echo $_SESSION[‘saz’] ;?> ” />’;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘$_SESSION Variable in hidden field’ is closed to new replies.