Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4669 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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.

Posted

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).

  • 3 weeks later...
  • Newbies
Posted

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!!!

Posted

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:

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);

This topic is 4669 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.