I'm struggling with this - perhaps someone can help.
I have created a chunk which contains the form for logging into the remote site and call the form in a page with [[!$MyForm]]
This works and I am logged on to the remote server in a new window as it uses target="_blank".
I have written a snippet to capture the Username from the form and place it in a session variable then show the session variable on the page so that I know it has been captured as below:
<?php
if (isset($_POST['Submit'])) {
$_SESSION['user'] = $_POST['user'];
return $_SESSION["user"];
echo "Username is " . $_SESSION["user"] . ".<br>";
}
?>
I am calling this after the form:
[[!$MyForm]]
[[!MySnippet]]
However, all I get when I enter the Username and Password in the form and click submit is the login page with no change (the remote page has opened logged on correctly in another window) - the username and password are still in the fields and no info is displayed by the snippet.
Obviously my code or process is incorrect?
[ed. note: bobd72 last edited this post 8 years, 10 months ago.]