Backgound: I have a wordpress installation with a basic myslq database structure managed by cpanel. I have implemented Gravity Forms plugin to generate a type of contact us form. If a customer has a question/complaint about a product, they fill the form out and submit. This will then go into a custom table (wp-contacts) I have created within the wp database. I use an ODBC connector to connect the data in the table with Filemaker. Our Customer Service team then can see the data in the custom filemaker application we developed and they can respond to the question.
Problem: I am having issues with my PHP script that is supposed to send the gravity from data input from the customer to the custom sql table I created. When I test the from and enter in sample data and click submit, I get a this page cannot be displayed error. Furthermore, there is no data present in the custom table I created. There is also the question of the captcha. I have implemented a captcha in the gravity forms, so I would assume I need some sort of field to set to 1 or 0 if the captcha was checked? What would be the best way to implement this? Here is my Script:
There are fields in my table that do not populate via the gravity forms contact us form. Rather, those fields are manipulated by our Customer Server team when answering a question in their filemaker app (i.e- answer, answered_by, etc.) and are used by filemaker for other purposes. For these fields, I used a place holder ''. My ID field is set to auto-increment for each record added. image of database structure
So, after some research I figured this out. I am posting the solution in case anyone else has this same question. Here is my updated code:
Once I took care of this, I started getting data to populate in the mysql table, however, only certain fields were populating. After further investigation, I noticed that my id's being used to access the $entry were incorrect. In order to get the correct id's, I right clicked on each field in the browser and inspected the element. This showed me a name attribute like this: name="input_1.3". The numbers after the "input_" prefix are the id to use for the $entry. I changed the id's I had wrong, and now the data is posting perfectly.