I have setup through the PHP site assistant to be able to fill out a questionnaire online and the info submitted is entered into a new record, then the same info is emailed to me. About a month ago this process was working perfectly and now I was going back in to finish one last thing and come to realize that when I hit submit it sends me blank emails. But when I go into my database the information is there in it's own record. And when I run the SMTP Email Script from within the database it will then email me the all the information in the record. I have created new forms, pasted in old code that were back when it was working and nothing seems to get it back to the point where it emails me the sumbitted info. Any ideas of where I can start looking to fix the problem? I have several files of php code for this setup that I can attach if needed. Just didn't want to clutter the post with a bunch of code.
4 replies to this topic
#1 OFFLINE newbie
Posted 12 January 2012 - 02:32 PM
#2 OFFLINE Independent Contractor
Posted 13 January 2012 - 02:31 PM
Are you triggering a FileMaker script from PHP to send the email? If not, what method are you using to send the email from the web interface?
You might want to check for PHP errors (google "enable php error logging" to learn how).
You might want to check for PHP errors (google "enable php error logging" to learn how).
#3 OFFLINE newbie
Posted 01 February 2012 - 09:23 AM
Hi dansmith65,
Now remember back around Dec 1st this was all working perfectly. Came back to it a month later and nothing works. And the in-between time I did do some changes to the database file in FMP but the changes had nothing to do with the scripts or tables that are associated with this questionnaire.
So what I am doing is I have a confirmation.php file that is called once the user hits submit. The first script setup in that file is to upload the photos submitted and copy the url to each photo. Then the next script in that file is to insert the information entered in on the form to a new record in the FMP database. I have it setup where there is a field in the database within FMP called rec_num each new record has a 5 set in that field when a new record is created. Then after all the info is inserted into that new record, the next script is performed, which performs a find to find all the records that have 5 in that field rec_num, then I tell it to paste into the record found the urls to the photos into specific fields - which this no longer works either, but did back in Dec. Then my next script that runs in the php file, is it performs a find again for all records that have 5 in the rec_num field. Then i tell it to execute the script setup within that database in FMP called SendEmail which that sends the email to me and in the body of the email contains all the information in that record, then in the same script SendEmail I tell it to enter a 6 in the rec_num field after the email is sent- It changes the 5 to a 6 in the field, but it just sends me blank emails, but back in Dec it worked.
To try and narrow down the issue Ive gone into my database and take a record and go into the rec_num field and change the 6 to a 5 in the rec_num and then it tries to send me an email of that record's information and it works. However, I still can't determine if the issue is with php on the server side or the script that is setup within my FMP database that is called by the php script on the server side. Any help would be so grateful!!!
Now remember back around Dec 1st this was all working perfectly. Came back to it a month later and nothing works. And the in-between time I did do some changes to the database file in FMP but the changes had nothing to do with the scripts or tables that are associated with this questionnaire.
So what I am doing is I have a confirmation.php file that is called once the user hits submit. The first script setup in that file is to upload the photos submitted and copy the url to each photo. Then the next script in that file is to insert the information entered in on the form to a new record in the FMP database. I have it setup where there is a field in the database within FMP called rec_num each new record has a 5 set in that field when a new record is created. Then after all the info is inserted into that new record, the next script is performed, which performs a find to find all the records that have 5 in that field rec_num, then I tell it to paste into the record found the urls to the photos into specific fields - which this no longer works either, but did back in Dec. Then my next script that runs in the php file, is it performs a find again for all records that have 5 in the rec_num field. Then i tell it to execute the script setup within that database in FMP called SendEmail which that sends the email to me and in the body of the email contains all the information in that record, then in the same script SendEmail I tell it to enter a 6 in the rec_num field after the email is sent- It changes the 5 to a 6 in the field, but it just sends me blank emails, but back in Dec it worked.
To try and narrow down the issue Ive gone into my database and take a record and go into the rec_num field and change the 6 to a 5 in the rec_num and then it tries to send me an email of that record's information and it works. However, I still can't determine if the issue is with php on the server side or the script that is setup within my FMP database that is called by the php script on the server side. Any help would be so grateful!!!
#4 OFFLINE Independent Contractor
Posted 01 February 2012 - 02:05 PM
I don't think there is any simple answer to this. I think you need to review error logs and debug your php script.
Sometimes I debug by adding a line like this to test if a section of the php script worked:
Also, adding this line to the beginning of your php file while debugging can help (by having the script show you error's it encounters).
Sometimes I debug by adding a line like this to test if a section of the php script worked:
die('made it this far');
If you see the 'made it this far' message, then you know the script is working up to that point (sometimes you will need to print some variables too).Also, adding this line to the beginning of your php file while debugging can help (by having the script show you error's it encounters).
error_reporting(E_ALL);
#5 OFFLINE newbie
Posted 02 February 2012 - 01:17 PM
Okay I will give this a try. Thx!
Also tagged with scripts, php
FileMaker and WEB 2.0 Technology →
PHP →
FileMaker PHP API →
FileMaker PHP API Connection issueStarted by Richard DarkMantis Clifford, 29 Feb 2012 |
|
|
||
FM Forums Affiliate Sponsors →
360 Works →
SuperContainer by 360 Works →
Displaying SC image in PHP site assistant generated siteStarted by SanderS, 10 Feb 2012 |
|
|
||
Brain Food →
The Left Brain →
Import .xls using variables in scriptStarted by Chris1961, 12 Jan 2012 |
|
|
||
FileMaker and WEB 2.0 Technology →
PHP →
FileMaker PHP API →
web request to run script that either finds existing or creates new recordStarted by Barbecue, 24 Dec 2011 |
|
|
||
FileMaker and WEB 2.0 Technology →
PHP →
FileMaker PHP API →
How to add Field names and values to an arrayStarted by DarkMantis, 23 Nov 2011 |
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
































