If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

JS/Flash Animated. Contact form and PHP4

This tutorial shows how to make HTML contact form in your JS or Flash Animated template work on PHP 4 hosting server.

1. Open MailHandler.php file

2. Replace the code:

 
try{
  if(!mail($owner_email, $subject, $messageBody, $headers)){
  throw new Exception('mail failed');
  }else{
  echo 'mail sent';
  }
  }catch(Exception $e){
  echo $e->getMessage() ."\n";
} 

with

mail($owner_email, $subject, $messageBody, $headers);

  • Simon

    PHP4 is an ancient version. Make sure to update the tutorial. Or at least remove `4`.

    No votes yet.
    Please wait...
    • Alex Ross

      This tutorials explains how to make contact form work with PHP 4. The form works fine with PHP 5 just out of the box.

      No votes yet.
      Please wait...
      • Simon

        Gotcha. This should work better (if anyone on earth is still using PHP4):

        if (!mail($owner_email, $subject, $messageBody, $headers)) {
        exit(‘mail failed’);
        } else {
        echo ‘mail sent’;
        }

        No votes yet.
        Please wait...
 
Live Chat
We help you to choose the right product.
Start chat