Form Thank You Page not Shown as PHP on Web Host

I’m creating a feedback form which captures the sender’s name, email address, and their comments/suggestions. The SEND button I’ve provided under the text input field links to a Thanks page. According to the Sparkle docs, the code on that thank you page should be PHP. Also, I’ve created a Thanks folder within which there’s an index file. When I go to my webhost’s file manager and look into the Thanks folder all I see is a 12kB index.html of type text/html. Webhost is Blacksun.ca. So, where is the php code that will email me the form data?

It would be best to ask @duncan this.
Older projects updated with the later versions of Sparkle 5 might not generate a thankyou.php, but instead a thankyou.html.

Going to call my web-hosting service, Blacksun.ca for tech support…

The PHP that processes the form data is part of the thank you page that you point to in the submit button. If you’ve set up your thank-you page in a folder named thanks, you must point to that particular page, and it must be a PHP page. Typically, there is no need to have it set up as an index file within it’s own folder. You only really want to use index as a file name if you expect visitors to go to that folder and you want the index page to automatically load. I think what you may have done is point your form to the thanks folder in the hope that the index file within it will just kick-in like a normal index page. If you have done this, you must rename the page from index.html to index.php. Then in the button link, point to the page - not the folder. For example, your thank you page link would look something like /thanks/index.php.

EDIT: It may be that your web host doesn’t support PHP - in which case, the php extension got renamed to html during the file upload process - although I don’t think that will be the case because they support Wordpress sites, which are also PHP.

1 Like