0){ $texttovalid = htmlspecialchars(stripslashes($texttovalid)); } return $texttovalid; } if(isset($_POST['submit'])){ $name = removeHTML($_POST['name']); $email = removeHTML($_POST['email']); $subject = removeHTML($_POST['subject']); $message = removeHTML($_POST['message']); $msg =''; if($name==''){ $msg = '
  • Name is a required field.
  • '; } if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email)){ $msg .= '
  • Invalid Email Address
  • '; } if($subject==''){ $msg .= '
  • Subject is a required field.
  • '; } if($message==''){ $msg .= '
  • Message is a required field.
  • '; } if($msg!=''){ $msg = '

    Message Field!

    '; } else{ /*Change this email to your email address*/ $to = "joefrey.mahusay@gmail.com"; $headers = "From: $email"; $subject = $subject." - A message from The Freelancer"; $body = "Name: $name\n\n" . "Email: $email\n\n" . "Subject: $subject\n\n" . "Message: $message" ; $ok = (mail($to, $subject, $body, $headers)); if($ok){ $msg = '

    Message Sent!

    Thank you for contacting us. We will get back to you shortly!

    '; }else{ $msg = '

    Message Failed!

    Please try again.

    '; } } } ?> The Freelancer - A premium grunge portfolio template for freelancers out there

    Contact Form

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.