Experimenting issues with forms (all methods)

I have a hosting provider that accepts standard mail send (more insecure but simple and effectie), I always used this method but now is not working with a test I am doing.

So I decided to try smtp sending, I match the server specs on blocs and mails are delivered but not arriving.

I remember doing this a while and it worked but not this time. I may think it is a blocs issue? The new spam prevent methods could have any interaction with this?

I am getting this log on both post methods:

Standard

[14-Jul-2026 12:56:42 America/Argentina/Buenos_Aires] PHP Parse error:  syntax error, unexpected '?' in /home/nicolasl/public_html/1/includes/form.php on line 11

$name = trim((string)($_POST['name'] ?? ''));

Phpmailer

[14-Jul-2026 12:53:42 America/Argentina/Buenos_Aires] PHP Parse error:  syntax error, unexpected '?' in /home/nicolasl/public_html/1/includes/form.php on line 19

$name = trim((string)($_POST['name'] ?? ''));

What does line 11 look like in the file it mentions? You should share that, I may be able to see the issue.

It looks like this (in both methods)

$name = trim((string)($_POST[‘name’] ?? ‘’));

I have an older php file generated by blocs that worked fine and it was like this

$nombre = $_POST[‘nombre’];

BlocsApp generates this line in the “form.php” file in the “includes” folder during export.
I mean, “??” isn’t available until PHP 7; maybe an older PHP version is being used.

1 Like

I exported a new site (https://nizetich.ar) with the standard mail export and it‘s working fine (cpanel server too)

Have you tried deleting the includes folder from the export folder before exporting AND deleting the includes folder from the server before uploading?

Yes, I also change the folder name to ensure a clean load

As @BLOCS-Freak already mentioned, check the version of PHP on your server, if it’s older than 7 change it.

1 Like

it’s the latest, but for some reason now its working fine.
Thanks!

1 Like