Want to show data only to those with the proper login? Try this very simple example.
This very simple example utilizes the database wizard without any special SQL statements. Follow these steps:
1. You must first create a database to hold user information (see the create database tutorial).
2. Create your database results page.
3. Launch the database wizard: Insert | Database | Results…
4. In step one, choose your data connection.
5. In step two, choose the record source (the table with the info).
6. Proceed to step three and choose More Options…
7. Click Criteria… from the More Options dialog.
8. Click Add.
9. Select the field name you want to use. In this example, the first we will choose is email and then password. Set the comparison for both to “Equals”.
10. The Criteria box should look like this:
11. Click OK.
12. Click on the defaults button.
13. Set the defaults to something that no one could ever think to type. This will assure that no records are returned when the page is loaded. Do this by clicking on the field name and selecting Edit…
14. Click OK and then OK again.
15. Click Next to proceed to step 4 of the wizard and choose the layout you want for your database results.
16. In step 5, Make sure you fill the Add search form check box and click Finish.
Your simple login is now complete. Save changes and test in your browser. Soon we will be adding additional tutorials that will contain custom SQL statements to perform various filtering tasks on your database results.