This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Post Session Variable


  1. AKirob
    Member

    Hi,
    I'm trying to pass a session variable from one page to a field on my form. I'm using the advanced method of embedding.

    The session var setting goes on here;

    <?

    if (isset($_POST['location'])) {
    // Start session support
    session_start();

    // Set the session var
    $_SESSION['location'] = $_POST['location'];

    // Redirect to a following page
    header("Location: form.php");
    }

    ?>
    <form method="post">
    <select name="location">
    <option>A</option>
    <option>B</option>
    <option>C</option>
    </select>
    <input type="submit" />
    </form>

    My form.php looks like;

    <?php session_start(); ?>

    <?php
    require("/var/www/vhosts/xxx.com/httpdocs/form/machform.php");
    $mf_param['form_id'] = 6;
    $mf_param['base_path'] = 'http://www.xxx.com/form/';
    display_machform($mf_param);
    ?>

    Please help!

    Thank you!!!

    Akirob

    Posted 14 years ago #
  2. yuniar

    We've replied to your support request email. Please check it there.


    MachForm Founder

    Posted 14 years ago #

RSS feed for this topic

Reply