Catch & stock CP value fields…
-
Hi there,
I make a Captive Portal page (based on boostrap).
I use form, where i ask "email adress" to connect and i would like store this value field (and other like remote adress or timestamp or everithing) in sql database (local or remote, it doesnt matter)
Here is my code:
<form method="post" action="$PORTAL_ACTION$" accept-charset="UTF-8" role="form"> ![...](captiveportal-logo.png) ### Connect </form>
Maybe somebody do it, or maybe somebody post how do in this forum (im already looking many posts since a couple a hour)
-
I was planning to implement similar functionality, but decided for a different approach in the end.
What I can say from my tests: you can create an "intermediate" PHP file that receives the form input, proccesses it in the may you want (send to syslog, send to database, etc.), and then calls the actual CP login page, passing the necessary fileds for a login (user/password, voucher code, etc.). AFAIK, the PHP MySQL module on pfSense is disabled by default, but can be enabled via some shell commands. I was planning to send the data to a syslog-ng instance installed on the pfSense machine, which would have spared me the hassle of setting up a database, connecting to it, etc. .