My.ADVISOR.com Sign-In
Username
Password
Sign Up 
Go to Article
Advanced Search 

FILEMAKER.PHP

Deliver Secure Web Applications with PHP and FileMaker Pro

Learn how to use PHP to process a user login and to maintain a session for logged-in users.

 Subscribers: Sign-in to activate download link -- Log-in and members-only PHP code for securing your Web applications.
By Jonathan Stark

UNLOCKED -- This article is provided to subscribers of FILEMAKER ADVISOR or BUSINESS SECURITY ADVISOR or DATABASED ADVISOR or FILEMAKER ADVISOR. To subscribe or renew, go to Advisor Store.

This was a fun article to write. If you don't mind indulging me, here's some background...

When I first started learning PHP, I did a bunch of "Hello World" exercises, read a couple books, and endlessly pestered the only PHP gurus who would put up with me (Jamie Ruppert and Greg Lane -- thanks, guys!). Still, there was an overwhelming amount of information to learn and it just wasn't clicking.

I decided the best way for me to learn PHP was to start building a Web site. I was well aware that my lack of experience would likely result in me trashing my Web server or getting mercilessly hacked, so prudence dictated I use myself as the guinea pig. All I needed was an idea for a site.

At the time, I just moved 1300 miles away from my immediate family, and a couple of my siblings were equally far-flung. What's more, both my parents are re-married, as are the parents of my step-sisters. The result is a dizzying family tree. The holidays were fast approaching and the whole (Brady) bunch of us were e-mailing Christmas lists back and forth in a huge disorganized mess. To top it all off, my birthday is on December 21st, so it was likely someone on my mother's side and someone on my father's side -- who we don't normally coordinate with about these sorts of things -- were going to get me the same thing for Christmas, birthday, or both.

So, the first version of TwelveTwentyfive.com was born. From the very first day, people were using it pretty heavily. I was getting feature requests left and right and I was racing to squash bugs. As soon as I got something working, I had to move onto the next thing. That being the case, there were a few things I built without ever understanding what was going on under the hood.

And that's why this article was so much fun to write. I finally had an excuse to dig into the underlying technologies that make a Web site login possible. I found all sorts of interesting material on the subject and just about everything I read triggered an audible "Oh, so THAT's how that works!"

The moral of the story is twofold:

1) If you're a feeling overwhelmed by PHP, just dive in and build something that solves a real problem.
2) You don't have to understand how something works to get good use out of it.

In this article, I show you how to build a functional login routine for a Web site built with PHP and FileMaker Pro. Along the way, I'll share some thoughts on the more abstract topic of how PHP sessions work in hopes of giving you a better understanding of Web applications, and the potential security issues involved with session management.

Glossary

First, I want to briefly define some terms I use in this article.

Guest: An anonymous user who is browsing public pages on your Web site.

Member: A user who has successfully logged into your Web site.

Credentials: A user's username and password.

Authenticate: To verify a user's identity.

Session: A mechanism for storing user-specific data on the Web server. You use sessions to preserve information across multiple Web page requests.

Cookies: A mechanism for storing data on the user's machine. Many Web sites use cookies to preserve information across multiple page requests, or even multiple visits to a site. You store cookies on the user's machine. Therefore, the user can manually edit the cookies at any time. Cookies are transmitted back and forth between a user's browser and a Web server in "headers."

Headers: Hidden data sent back and forth between a Web server and a browser that contains information about the transmission.

Deliver Secure Web Applications with PHP and FileMaker Pro

No reader comments ... yet.

    What do YOU think about this topic? Share your advice and thoughts using this form.

    Your Name

    REQUIRED : PUBLIC

    Your E-Mail

    REQUIRED : PRIVATE

    Job, Company

    OPTIONAL : PUBLIC

    City, State, Country

    OPTIONAL : PUBLIC

    Your Web Site

    OPTIONAL : PUBLIC

    Your Comment

    Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


    Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

    Jonathan StarkJonathan Stark is an author and instructor who specializes in FileMaker/PHP Web applications for creative professionals. Past clients include Staples, Turner Broadcasting, and Ambrosi (now Schawk). He has spoken at the FileMaker Developers Conference, has had numerous articles published in FileMaker Advisor and php|architect magazines, and is the author of the book Web Publishing with PHP and FileMaker 9 available from SAMS Publishing. Jonathan is reluctant to admit that he began his programming career more than 20 years ago on a Tandy TRS-80. http://jonathanstark.com

    Printer-friendly
    page layout

    Keyword Tags: FileMaker, FileMaker Development, FileMaker FileMaker Pro, PHP language, Security, Web Development

    ADVISORAMA
    Besides adjourning, what other good thing has Congress done this year?

    ARTICLE INFO

    FileMaker Advisor

    Web Edition: 2007 Week 51, Doc #19345

    Print Edition: February/March 2008, Page 26

    SUBSCRIBER ONLY ARTICLE LOCKED


    File: Log-in and members-only PHP code for securing your Web applications.
    Subscribers, log-in for Download link.

    Subscribe to FileMaker Advisor Magazine

    Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.

    FileMaker.Advisor.com

    Subscribe to Advisor Basics of FileMaker Pro

    Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!

    FileMaker.AdvisorBasics.com

    Secrets Of The Top Experts -- Now!

    See exactly how to do it, step-by-step, in Advisor Academy CDs created by the top experts. Click to see what you can learn right now.

    AdvisorAcademy.com

    Free E-Newsletters

    Keep up! Hot News, How-To, Tips & Tricks, Expert Advice, and more. Click to request your's free.

    AdvisorUpdate.info

    Need Know-How Now?

    What direction are you going with your business? Advisor Guides are packed with the answers you need to work smarter. Can you afford to fall behind?

    AdvisorStore.com

    Showcase Your Smarts

    Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!

    AdvisorTips.com

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
    Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
    ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
    Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
    stark012 posted 12/17/2007 modified 05/12/2008 03:44:00 AM ztfmfd/ztfmfd
    domino-144.advisor.com my.advisor.com 05/16/2008 12:23:33 PM