Hi guys,
Im currently setting up a new system where we need to use MAC login through a web form on a cloud server.
The form will ask for such things as email address and store it away in a database.
I have this side of things working by using simple PHP POST into a mysql database connector.
When I try to integrate this with the login.php from here : https://wiki.mikrotik.com/wiki/HotSpot_external_login_page I run into problems.
I understand that I dont need to bother with much of the detail in the form relating to the login but Im finding it difficult to modify the form so that it still collects some data through fields which are sent to the database and also at the same time takes care of MAC address login.
Ive set up my login.html on my routerboard as follows:
<html>
<head>
<meta http-equiv="refresh" content="0; url=login?username=myUsername&password=myPassword">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<title>...</title></head>
<body>
$(if chap-id)
<noscript>
<center><b>JavaScript required. Enable JavaScript to continue.</b></center>
</noscript>
$(endif)
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action="https://x.x.x.x/login.php" method="post">
<input type="hidden" name="mac" value="$(mac)">
<input type="hidden" name="ip" value="$(ip)">
<input type="hidden" name="username" value="$(username)">
<input type="hidden" name="link-login" value="$(link-login)">
<input type="hidden" name="link-orig" value="$(link-orig)">
<input type="hidden" name="error" value="$(error)">
<input type="hidden" name="chap-id" value="$(chap-id)">
<input type="hidden" name="chap-challenge" value="$(chap-challenge)">
<input type="hidden" name="link-login-only" value="$(link-login-only)">
<input type="hidden" name="link-orig-esc" value="$(link-orig-esc)">
<input type="hidden" name="mac-esc" value="$(mac-esc)">
<input type="submit" value="continue">
</form>
<script language="JavaScript">
<!--
document.redirect.submit();
//-->
</script></center>
</body>
</html>
If anybody can offer any advice on how to get this done Id appreciate it.
thanks,
Paula