Have you ever wanted to make your own login pages for FileMaker Server’s Instant Web Publishing? Or maybe give your users a single click login from a URL?

Here is the code that will get you there:
1.) The first is a custom login form page. There are several hidden form elements that are required when submitting to the FileMaker Server authentication CGI. The example code below will show you.

<form action="http://fmserver.example.com/fmi/iwp/cgi" method="get">
<input type="hidden" name="dbpath" value="/fmi/iwp/cgi?-db=exampledb&-startsession">
<input type="hidden" name="acct" value="account">
<input type="hidden" name="-authdb">
<label>Account</label>
<br />
<input type="text" name="name"><br />
<label>Password</label><br />
<input type="password" name="password"><br />
<input type="submit" name="login" value="Login">
</form>

That basic form will allow you to host your own login page for your FileMaker IWP solution. Here is a working example: Login Form

2.) You can also initiate an auto login from a link! Just follow the example code below:

<a href="http://fmserver.example.com/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3Dexampledb%26-startsession&amp;acct=account&amp;name=userName&amp;password=Password&amp;login=Login&amp;-authdb">Your Login Link</a>

Notice the use of URL friendly characters in certain places. This encoding is key to the success of the link.

That is the basic URL syntax to access your FileMaker IWP solution via a direct link! Here is a working example: Click me to login!

These examples were created and tested using FileMaker Server 9 Advanced! Although I haven’t tested these methodes with previous versions, they still may work.