Page with form uploaded to server but not working

I uploaded the js file for the form, php file and the html file to the server. address: Nothing happens when I test click “submit.” Ipage tech support checked their end and said everything seems fine- addresses are correct. To and from.

Ok- stupid question. I was unable to upload “includes folder with php file” to root folder so I created new file on the server and copied the php file which is in with the other html files. That didn’t work. So then I created the ‘includes’ folder in the root folder and then created new file, copied PHP. Still not working.

(Disregard the form_1…php file- the server won’t let me delete it and it’s empty).

Anything else I should try? Thanks in advance.

I do not promise but in Adobe Muse it was common to happen and it worked like this:
With FTP access in public_html, locate the form_process.php file.

Opening this script file / form_process.php using a text editor, it located the line:
$ sent = @mail ($ to, $ subject, $ message, $ headers);

Replaced by:
$ sent = @mail ($ to, $ subject, $ message, $ headers, “-r”. "");

Note: replace with valid email.

Thank you-- I’ll try that and then give ipage support another call if it doesn’t work.

Followup. The php code generated with the blocs form unfortunatley is not the same as your example, so I’m not sure what to change.

Bloc generated this PHP:

<?php if(empty($_POST['name']) && strlen($_POST['name']) == 0 || empty($_POST['email']) && strlen($_POST['email']) == 0 || empty($_POST['message']) && strlen($_POST['message']) == 0) { return false; } $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $to = ''; // Email submissions are sent to this email // Create email $email_subject = "Message from a Blocs website."; $email_body = "You have received a new message. \n\n". "Name: $name \nEmail: $email \nMessage: $message \n"; $headers = "MIME-Version: 1.0\r\nContent-type: text/plain; charset=UTF-8\r\n"; $headers .= "From:\n"; $headers .= "Reply-To: $email"; mail($to,$email_subject,$email_body,$headers); // Post message return true; ?>

Any suggestions-- this seems way above my pay grade :slight_smile: and currently I’m having to rely on an outside url for contact form through I called ipage tech support twice and they said they can’t fix anything at their end – and no one could explain how to implement their instructions on PHP:

How PHP works at iPage
iPage’s PowerPack allows you to write scripts using PHP. To ensure that your PHP scripts work smoothly, please refer to the following information before you get started:
• Path to your Web document root: /home/users/web/b487/ipg.snowlion
• This is important, as most of your scripts will need to specify this location. For example, this is required if you’d like your PHP script to upload files.

• Current Default version of PHP: 5.5

Any insight would be appreciated. Thanks!!!

It may have something to do with the fact you’re trying to use the PHP sendmail function of your server to send an email to a gmail address. In order to prevent servers becoming spam gateways, many hosting companies will not allow sendmail to send messages to any email address outside the primary domain. You may have to find a way to utilise a secure SMTP connection to forward your form contents. Alternatively, create an email address on your domain and use that to forward your messages to.

1 Like

Thanks for the suggestion. I’ll give it a try. I contacted ipage again, third person tried to modify some code spent an hour on this but still didn’t work so she bumped the issue up to their senior team. Ticket is open so if it get resolved I’ll update in case someone else has a similar issue. Regarding where the PHP file is placed- third person said it didn’t matter- either public_html or in cgi-bin folder. They are aware I’m sending to a gmail address and didn’t mention that could be the problem. They seem stumped by the problem. But I will change the “to address” and see if it works.

Bingo-- this worked! Not sure why ipage support didn’t suggest it, but what a simple solution. THANK YOU!!

Glad it worked out for you. This is becoming quite a problem these days. Hosting companies don’t specifically target public domain email address such as gmail - they just stop emails being forwarded to any email address outside of their own mail servers. I’m hoping that blocs will soon have the ability to use third-party scripts so that forwarding via secure SMTP could present a viable alternative. To use SMTP for forwarding form results usually requires hosting companies to open a specific port for your script to access SMTP accounts. Unfortunately, the current Blocs generated script doesn’t appear to allow for adding this information.