So many users tell us how much they like the hooks feature in AppGini. It allows almost unlimited ways to customize the generated AppGini apps; changing appearance, adding features, pages, rapid workflows, … etc. In fact, users really surprise and amaze me with the very creative things they do using hooks. Due to the power […]
Category Archives: PHP
Prevent specific groups from directly accessing a table in AppGini
In some application scenarios, you might meet the usage case where you want one or more user groups to be able to access a table only if it’s displayed as a child table, but not directly as a master table. Let’s take an example from the Northwind demo. Let’s say you have a users group […]
A work-around to implement a multiple choice lookup field in your AppGini apps
AppGini provides a multiple choice option list field, which is a handy way to allow users of your app to select multiple values from a list, for example to add tags/labels for a record. This is how it works: And this is how to configure it in AppGini: There is a problem with the above […]
How to hide columns in table view based on user group?
I got a question from an AppGini user on how to hide specific columns in the table view based on the user group. This blog post explains how to do this through hooks. As an example, we’ll modify the orders table of the Northwind demo to hide the ‘Customer’ column for ‘Suppliers’ and ‘anonymous’ groups, […]
Overwriting AppGini functions, allowing admin group members to access the admin area
Heads-up! We’ve recently added an option to allow Admins group members to access the admin area (except the admin settings page). So, the code listed here for overriding getLoggedAdmin() is no longer necessary if you’re using AppGini 22.12 or above. The code for overriding generated functions is still applicable though if you need to override […]
Trying to detect your application URI using DOCUMENT_ROOT? Read this first!
The application URI is the part of the URL after the host name (domain name) and before the home of your application. For example, for this blog, the URI is /blog/. If you are writing a PHP application to be distributed and installed in many environments that you have no idea how they are configured, […]
Prepare a LAMP web development server on Amazon EC2
Here is a quick checklist for setting up LAMP development server on Amazon EC2. I used a standard Amazon Linux AMI on a T2.micro instance, which costs about $9/month at the time of writing this. Edit the DNS zone for your domain to add an A record for a sub-domain to point to the public […]
How to paginate a database query in PHP — the no-frameworks way
OK, I admit! Every time I have to write similar code I get stuck rethinking it — every time … If I wasted 10 minutes thinking of it every time, and I did so for 100 times, then I’ve already wasted more than 2 working days in the last 12 years doing it! I guess […]
Making sure a PHP script is accessible only through being included
Let’s say we have a PHP script that we don’t want users to access directly by calling it through their browser. We want that script to be included in other scripts but not accessed by typing its URL. A lot of sites suggest saving such scripts into a directory outside the document root. This would […]