Recommendations for adding PHP code/External database connectivity

Permalink
I am working on building a web page for a newly formed flying club that I am a member of. I initially used a website builder to get a few pages up and going but have always planned on moving it to a more customizable platform. A work colleague told me about Concrete5 and I have been playing around with it for 6-8 months or so, and really like it. I'm no programming expert, but I have done a fair amount of programming over the years.

So, to my goals...

For the most part, I have my test site where I want it to be, with only a couple of exceptions. Being a flying club, I am creating a database for aircraft type stuff which I would like to be able to update/access from within my site.

1.) What is the best way for me to create forms to allow me to update certain database information (external database to Concrete5)? My thoughts are use HTML blocks to code the forms, then have the form reference a "single page" php file to perform the necessary database actions. I've looked that the external forms block and just can't get my head around it. However, if that is the best option for building forms, I can spend some more time to figure it out.

2.) Obviously, in certain areas of the site I'd like to pull information from this database to display on the page. From what I've seen, I could use an add-on that allows me to insert php code, create my own block (not sure how to do this), or just use a single page that has the php code in it. I don't prefer the last option as some of the information relates to other information on other pages within the site. Ideally, I would like to add it to a block where I need it. Is the best option here to use an add-on (Code Blocks I think), or create my own block (which would require some research)?

One last thing that I've been asked to do is add a map showing all of the places the airplane has been. For this, I'm jut wondering if there is already an add-on that I may not have seen yet?

I apologize for the lengthy message, but would really appreciate your responses.

Thanks!

 
leertes replied on at Permalink Reply
leertes
Hi

You may have already discovered this but if not have a look at these 2 addons.

Advanced Forms and Data Display package

Advanced Forms lets you create forms from the backend of your site and then use them on your site to collect data from your users. It also integrates with the Data Display package.

Unless you have a specific need for it there's probably no need to jump in and out of a external database.
cnd4ua replied on at Permalink Reply
Thanks so much for the response and I think those add-ons would help do some of what I need, but not sure if it would do everything. Basically, I need to be able to add data to the database, then perform some math on some of that data and display the results on one of my pages. I have gotten this to work by using an external database and PHP code in a "single page", but would like to include this data on an existing page if possible. Below are some details if you have the time to look at what I'm trying to do.

As I mentioned, I am working on this project for a flying club. We have one airplane at the moment and I want to display a maintenance summary on one of the pages. Since the plane is rented out, we have certain maintenance requirements that have to be performed on a recurring basis. For example, the 100-Hour inspection has to be performed every 100 hours and we like to perform oil changes every 50 hours. So I currently have an external database that has 3 tables. An aircraft table (shows info about the plane itself), a maintenance type table (to show the types of maintenance that I am tracking) and then a maintenance summary table which has columns that link to the previous two tables as well as dates and hours of the maintenance item. Also, each table has a unique primary key that auto-increments. So, every time we perform one of these maintenance items, I want to add it to the database. Then on one of my website pages, display a table that shows the last time that maintenance item was completed as well as the next time it is due. The next time it is due is calculated in my PHP code based on numbers retrieved from the database.

I am all for figuring out how to use the same database that concrete5 uses if I can figure out all of the hooks and the best way to do it. However, I am a network engineer by trade, not a developer, but I have learned some basic PHP/MySQL over the past 2 years for a project I was involved with at work. In my PHP code, I use the procedural (mysqli) commands as opposed to the object oriented. I'm still researching and willing to learn new things but it's a lot easier if I have examples to look at.

Any additional information is much appreciated and if I can get this figured out, it may help me figure out a few other things I’d like to do.