SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    It's been real... Forbes's Avatar
    Join Date
    Dec 2004
    Location
    Yorkshire, England
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question 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!

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,817
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    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?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    It's been real... Forbes's Avatar
    Join Date
    Dec 2004
    Location
    Yorkshire, England
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!

  4. #4
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile register_globals set to off in PHP 5

    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:

    http://www.boogdesign.com/b2evo/inde...gister_globals

    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.

    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!

  5. #5
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTTP_POST_VARS not supported

    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.

  6. #6
    SitePoint Enthusiast
    Join Date
    Apr 2008
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what would be the next best alternative to jack's script?

  7. #7
    It's been real... Forbes's Avatar
    Join Date
    Dec 2004
    Location
    Yorkshire, England
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guitarbinge View Post
    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...

  8. #8
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RWBdesign View Post
    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.
    YES! Over a year later and this post is still helping people!!! Thank you!!!

  9. #9
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Um...over two years...I need some sleep!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •