Simple PHP with CP… But
-
hello, we have a very simple CP with no authentication.
on our test webserver the PHP code works fine, from our index.php the CP users are redirected to a specific website (which includes their name on the page) and their name & email are written to a CSV file
however when this index.php is uploaded to pfSense, neither of those 2 things happen.
Here is the PHP code copied to a txt file, does anyone have comments please?
-
I have noticed a very basic error (I'm not the coder)
requirement = Include a form (POST to "$PORTAL_ACTION$") with a submit button (name="accept") and a hidden field with name="redirurl" and value="$PORTAL_REDIRURL$".Our index.php has action=""
and we have omitted action="$PORTAL_ACTION$" -
well we substituted action="$PORTAL_ACTION$" for what was there originally, no difference
-
just to clarify,
yes the "After authentication Redirection URL" field in CP config works, to the extent that I can nominate a web a page to bring the user to.
But ideally we require to insert the user name on that page as you see from our PHP code. And that works fine on our test web server (not pfSense) when we use our own redirect codingI would like to know if there is a way to pass a variable to the "After authentication Redirection URL" to achieve what we want to do
www.hayfieldmanor.ie/wifi-landing-page?user=$fnameAnd secondly with the user data we capture on the index.php to write the data to captiveportal-data.csv, again our code works on a regular webserver but not when uploaded to pfSense
Does anyone know what we should do to tweak things and get it working on pfSense?
Thanks