Using Standalone Page with Custom Files (v2025)

Your code contains some <script> and <style> tags and style attributes, if you have enabled CSP for the project, they are not allowed by default. You should add nonce attribute to the tags, see example.

Also search this forum about how to modify the CSP directives.

For the the form submission issue, you should debug by:

  1. Enable Debug,
  2. Press F12, submit your form again, in the Console panel, check if there is any JavaScript errors,
  3. In the Network panel, select the request and check HTTP request and response, check the Payload panel to see if post data is correct, and check the HTTP response if there is any server side errors.
  4. Check the log file for errors and stack trace.

On the other hand, your code uses another connection script, it is better to use Include common files (so that you can reuse PHPMaker code and get rid of your connection.php) and convert your code to use DBAL for better long-term maintainability.

If you do not want to refactor everything at once, you can at least switch to using the DBAL connection and then obtain the native connection from it, allowing you to continue reusing your existing code while moving toward a more consistent architecture.

For example:

// Get DBAL connection (Doctrine\DBAL\Connection)
$conn = Conn(); // Assume you use the main connection

// Get native mysqli connection from DBAL
$link = $conn->getNativeConnection();

// your existing code...