[Pro] PHP headache

Hi everyone,

You meet me at the end of a very frustrating day with PHP.

Essentially all I want to do is have a simple form send me the details in an email.

I’ve followed the instructions from the Softpress website to the letter.

And my server allows PHP.

Not only do I not get my emails, but for some odd reason the submit button takes me to a page on my site I haven’t specified in the Action. I created two new pages as per instructions Error and Success and it just won’t work?

What are the common causes of this not working and what should I check?

Really hope you can help.

Many thanks,

Mark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry, two more things to add which might help.

Does the page have to end in PHP instead of HTML.

Also I see there is a Page Action ‘PHP Feedback Form’ and an Item Action ‘PHP Feeback Form’. Which is the right one to use, or should I be applying them both?

Very many many thanks!

Mark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Mark,
Your page can have any extension you like (.html, .php, asp etc) as all of the PHP magic is held in a separate PHP file that the Action creates and links the form to.

You can use either the item or page Action it is up to you. I provided both as the item Action is useful if you want to create a page with multiple form on it (something Freeway doesn’t normally allow you to do).

In regard to getting your form up and running, do you have a link that you can share with us?
Regards,
Tim.

On 13 Jul 2012, at 14:24, Mark Lawrence wrote:

Does the page have to end in PHP instead of HTML.

Also I see there is a Page Action ‘PHP Feedback Form’ and an Item Action ‘PHP Feeback Form’. Which is the right one to use, or should I be applying them both?


FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com
FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Tim,

I’ve been having a little play and it now seems to through back my ‘Error’ page which is great. Is this a tale tale sign of a problem somewhere?

And I now have the action on the page, rather than on the table itself.

Also, is there something I have to physically do on my hosting server to make this work or does the action do all this for me?

This the test page: http://www.alternative-angles.com/preview/Contact/contact.php#.UAAoZo5RAUU


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I just tried and got a success.
Trev

On 13 Jul 2012, at 14:53, Mark Lawrence wrote:

Hi Tim,

I’ve been having a little play and it now seems to through back my ‘Error’ page which is great. Is this a tale tale sign of a problem somewhere?

And I now have the action on the page, rather than on the table itself.

Also, is there something I have to physically do on my hosting server to make this work or does the action do all this for me?

This the test page: http://www.alternative-angles.com/preview/Contact/contact.php#.UAAoZo5RAUU


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Trev,

Just received it! I’m so happy…but confused!

I don’t know what’s changed?

Is there some form of character check on what’s entered that would through up an error message?

Thank you for your help.

M


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Mark, one mistake I used to make with the PHP feedback form was just putting gobbldegook in the various fields. It has to have a properly formatted email address in there to operate properly, and possibly something else in another field (possibly telephone?), but I can’t recall what.

Someone more knowledgeable than me will probably step up here.

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Two things to understand here. First, the Action enforces a proper e-mail format on the email field – but only if the field is properly named email using the Name field in the third tab of the Inspector. (The content of the Title field, in the first tab of the Inspector, does not control the actual name attribute, which is the only important attribute when constructing a form.)

Second, when you send mail from a Web server, the owner of that server may have configured the mail service to only allow certain e-mail addresses to send out mail. The PHPFF Action forges the “from” header in the mail that it sends so that the message appears to come from the person who filled out the form. (This is for your convenience, so that you can reply to the message and it will come back to the sender without you needing to manually construct a new message.) Sometimes, these two objectives are in conflict, and you won’t ever get any mail as a result. When that happens, the answer is to rename the email field to something else, like customer_email, and rely on the settings of the Web server to send you a message from “email@hidden” or something equally weird, with the customer_email value in the body of the message. Less useful, but it works around the conflict.

One more thing – many mail servers (mine, particularly) use a technique called “grey-listing” to screen out potential spam messages. The way this works is when they receive an incoming message, instead of accepting it right away, they send back a command that means “I’m really busy, please try again in a few minutes”. A spammer will be in fire-and-forget mode, so they won’t ever try back. A real mail server will do as requested and re-send in a few minutes. Once a couple of messages arrive from the sender, the mail server will add that sending server to the approved list, and messages will flow normally. What this means is that there can often be a delay when receiving mail from a new server, and this can play tricks on you when testing out a new installation. I often use my .mac account in place of my ISP’s account, because they don’t do any of those tricks – the mail just comes immediately through.

Walter

On Jul 13, 2012, at 10:01 AM, Mark Lawrence wrote:

Hi Trev,

Just received it! I’m so happy…but confused!

I don’t know what’s changed?

Is there some form of character check on what’s entered that would through up an error message?

Thank you for your help.

M


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Trev,
Typically when the PHP the Action creates works on a server it will continue to work until the server gets updated or I introduce an error in the Action! When the code works it should just work. As Walter mentioned in his detailed reply (thanks Walter) the PHP does a bit of validation on form fields that have specific names (see the ‘special names’ section here: http://www.freewayactions.com/product.php?id=019) so you will have to remember to enter text that looks like an email address in a field called ‘email’ for example.
Regards,
Tim.

On 13 Jul 2012, at 15:01, Mark Lawrence wrote:

Just received it! I’m so happy…but confused!

I don’t know what’s changed?

Is there some form of character check on what’s entered that would through up an error message?

Thank you for your help.


FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com
FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just wanted to thank every one for their informed, and very helpful feedback. Walt, very much appreciated indeed.

Thanks again.

Mark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options