How to use joomla's sessions to transfer information from input box to registration form

by Dwayne M   Last Updated April 20, 2015 22:04 PM

On my homepage, I have two boxes where new users will input their name in the first box, and then their email in the second box(image 1). Once they register, they will be taken to the registration page(or comreg) where their information will automatically be transferred to the form so they do not have to enter it again(image 2). I have tried a few mixes but none seem to work in joomla. This is what I have tried so far:

First page

<?php
    session_start();
    if(isset($_POST['input1'])
    {
        $input1 = $_POST['input1'];
        $input2 = $_POST['input2'];
        $_SESSION['sessionInput1'] = $input1;
        $_SESSION['sessionInput2'] = $input2;
    }
?>

Second page

<?php
    session_start();
    //retrieve session value
    if(!is_null($_SESSION['sessionInput1'] && !is_null($_SESSION'sessionInput2'])
    {
        $output1 = $_SESSION['sessionInput1'];            
        $output2 = $_SESSION'sessionInput2'];                 
    }          
?>

image1

image 2

Thanks in advance

Tags : registration


Related Questions


Register URL for my website

Updated August 16, 2015 17:04 PM



Joomla Registration: Remove unneeded fields

Updated May 28, 2016 08:04 AM