Jump to content

What is wrong with this PNG??


asdgq9

Recommended Posts

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Send Data Form</title>
</head>

<body>
<?php

if(!$_POST) exit;

$email = $_POST['Email'];
$name = $_POST['Name'];
$telephone = $_POST['Telephone'];
$comments = $_POST['Comments'];

//$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS';
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){
   $errors=1;
}
if($errors==1) echo $error;
else{
   $values = array ('Name','Email','Telephone','Comments');
   $required = array('Name','Email','Telephone','Comments');
   

   $your_email = "****************";
   $email_subject = "Comment posted from website:";
   
   
   foreach($values as $key => $value){
     if(in_array($value,$required)){
      if ($key != 'Name' && $key != 'Comments' && $key != 'Telephone') {
        if( empty($_POST[$value]) ) { echo 'Please go back and complete all fields, thank you.'; exit; }
      }
      $email_content .= $value.': '.$_POST[$value]."\n";
     }
   }
    
}
   
$headers = "From: $email\r\n"."Reply-To: $email\r\n".'X-Mailer: PHP/' . phpversion();
   

mail($your_email, $email_subject, $email_content, $headers);

if($send_contact){
echo "Thank you for your submission";
}
else {
echo "ERROR, your comment was not sent";

?>
</body>

</html>

 

MOD EDIT:

 . . . 

tags added.

Link to comment
https://forums.phpfreaks.com/topic/230307-what-is-wrong-with-this-png/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.