Conditional redirect URL with login possible?

I need to post a form to redirect to a PHP page and log into it.

The script looks like this, is it possible to do accomplish this with Gravity Forms conditional or with an add on? Thank you so much in advance for your help!

Can you share the script? You said ‘looks like this’ but nothing came through. Use a code sharing site if you like, and post the link to your code here. Thank you.

1 Like

I had to sign up another account because the one I signed up to ask this question got temporary locked!!!

here is the code.

Thanks for your help!

The whole code didn’t show up on the codeshare. here it is: So it needs to script log into that php page. Is that possible?


<input type="hidden" name="Source" value="TOBEPROVIDED" />
<input type="hidden" name="LeadType" value="TOBEPROVIDED" />
<input type="hidden" name="RedirectToURL" value="#REDIRECTURL" /> 


I’m not sure of all your requriements, but I have used the function below in a PHP app script to auto-login a user…


function auto_login($name, $pass)
        $creds = array();
        $creds['user_login'] = $name;
        $creds['user_password'] = $pass;
        $creds['remember'] = true;
        $user = wp_signon($creds, false);

        if (is_wp_error($user))
                echo "Unexpected error - login for user $user returned: " . $user->get_error_message();

Thank you! So I guess Gravity Forms isn’t going to do it, I need to use a php script.

I appreciate the answer!