forbes — 2008-02-21T11:44:59-05:00 — #1
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!
felgall — 2008-02-21T13:48:30-05:00 — #2
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?
forbes — 2008-02-21T14:32:07-05:00 — #3
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!
rwbdesign — 2008-03-21T16:12:08-04:00 — #4
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?
rwbdesign — 2008-03-22T01:43:44-04:00 — #5
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.:)
I'm now a proud, and tired noob....
Hope that helped you too.
guitarbinge — 2008-05-05T18:10:08-04:00 — #6
what would be the next best alternative to jack's script?
forbes — 2008-05-05T18:18:29-04:00 — #7
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...
richardsanchez — 2010-09-21T07:32:24-04:00 — #8
YES! Over a year later and this post is still helping people!!! Thank you!!!
richardsanchez — 2010-09-21T07:33:24-04:00 — #9
Um...over two years...I need some sleep!!!