FormMail.php script for PHP5?

Hi guys! Does anyone know where I can get an updated version of Jacks FormMail.php script for PHP5?

I’ve tried updating the version I have, but it’s throwing errors in places that it really shouldn’t.

Even with all my years of PHP behind me, I still can’t figure out what that script’s doing.

I know one thing — v5 doesn’t work with my hosts install of PHP5!

Thanks!

PHP5 is backwards compatible with PHP4 so any script written for PHP4 should continue to work on PHP5 without requiring any changes.

What sorts of errors are you getting?

Hi Stephen! I’m guessing you’re familiar with Jack’s FormMail script, right? Well I’ve been using that for years without fault.

I’m not getting errors as such, I just can’t get at the variables being passed by the contact page, so required variables evaluate to being empty, plus the error and thank you pages aren’t used.

But when I run something like print_r($_POST) the variables are all there.

I’ve since started migrating stuff over to a new server running PHP5 — starting with my 'blog — and that’s when things started to not work.

The new server has register_globals turned off, which is one problem, but I’ve since tried a new version of the FormMail script, but that’s not working either.

So if you know of a replacement to the aforementioned script(s), that would be great!

I really don’t know what I’m talking about, so don’t necessarily trust the messenger, however I’ve been messing with Jacks script all day. I found this link:

and its helped tremendously. It says that PHP 5 defaults to register_globals off and Jacks and many other older scripts use register_globals on. He recommends against turning it back on and just fixing the scripts.

If only I wern’t a PHP noob.:confused:

HOWEVER, I am now getting the emails with the correct email address and subject, and my user is being correctly redirected, BUT my emails are blank. I’ve quadruple checked my forms and made a new completely simple form in case I missed something so I don’t think its a form issue. Any ideas?

Thanks!

Change all the HTTP_POST_VARS in Jacks script to $_POST and fix the other problems from the post above and you should be good to go.:slight_smile:

I’m now a proud, and tired noob…

Hope that helped you too.

what would be the next best alternative to jack’s script?

In the end, I had to write my own.

I call it Respondr and I’m using it on my 'blog right now.

I plan on turning it into a Plugin for WordPress at some point…

YES! Over a year later and this post is still helping people!!! Thank you!!!

Um…over two years…I need some sleep!!!