Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

What Internet Browser Settings Must Be Enable or Disabled for a PHP Form Script to Send a Form???

Guest
Sep 12, 2011 Sep 12, 2011

Helo,

I am running Windows XP Pro.

What Are the Internet Browser Setting that can Stops my form''s data from being received as  emails.

The Form Date is Received into Selected Email Boxes When the Form is Filled Out from Other PCs.

http://www.collegestudentvoice.com/form.php

1. All Emails boxes are set up.

2. Have turned OFF NetworkSolution Firewall.

3. Firefox  http referer is SET to  2.

4. Form generated NO ERRORS  when I fill it out.

cheers,

Dreamweaver101.1

TOPICS
Server side applications
688
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 12, 2011 Sep 12, 2011

First the browser has nothing to do with sending PHP emails.

Second are we talking about a testing server (Win XP)?

If so, you will be unable to test mailing unless you have Win XP Pro and install a SMTP server or use the SMTP server of your ISP (many times this is not allowed).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 12, 2011 Sep 12, 2011

ok,

why then when the form is filled out from another pc  its emails  are  received???

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 12, 2011 Sep 12, 2011

If that's the case then you need to post the PHP code from your mailer script to be examined.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 12, 2011 Sep 12, 2011
LATEST

Hello,

The problem may be in a script but I also believe it has to do with my browser settings.

How else to explain that the form's data is NOT  received  from my laptop but is received  from pc of my friend in LA and the form developer's pc.???

There three files that deal with the form email script:

1.   http://www.collegestudentvoice.com/form.php

2.  http://www.collegestudentvoice.com/send-email-form.php

3      FORM  ACTION.PHP File :

<?php
  require_once('recaptchalib.php');
$privatekey = "6LfwwsISAAAAAAPShkJ6nV3qkgLDHCe2uXj9RTWw";
  $resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

  if (!$resp->is_valid) {
    die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
         "");
  }
  else {
  
       
include_once('Mail.php');
include_once('Mail/mime.php');

$errors ='';


$max_allowed_file_size = 10000000; // size in KB
$allowed_extensions = array("jpg", "jpeg", "gif", "bmp");
$upload_folder = 'files/';


    $name_of_uploaded_file =  basename($_FILES['uploaded_file']['name']);
   
    $type_of_uploaded_file = substr($name_of_uploaded_file,
                            strrpos($name_of_uploaded_file, '.') + 1);
   
    $size_of_uploaded_file = $_FILES["uploaded_file"]["size"]/1024;
   
   
    if($size_of_uploaded_file > $max_allowed_file_size )
    {
        $errors .= "\n Size of file should be less than $max_allowed_file_size";
    }
   
    $allowed_ext = false;
    for($i=0; $i<sizeof($allowed_extensions); $i++)
    {
        if(strcasecmp($allowed_extensions[$i],$type_of_uploaded_file) == 0)
        {
            $allowed_ext = true;       
        }
    }
   
    if(!$allowed_ext)
    {
        $errors .= "\n The uploaded file is not supported file type. ".
        " Only the following file types are supported: ".implode(',',$allowed_extensions);
    }

    if(empty($errors))
    {
        $path_of_uploaded_file = $upload_folder . $name_of_uploaded_file;
        $tmp_path = $_FILES["uploaded_file"]["tmp_name"];
       
        if(is_uploaded_file($tmp_path))
        {
            if(!copy($tmp_path,$path_of_uploaded_file))
            {
                $errors .= '\n error while copying the uploaded file';
            }
        }

       
        $Business = Trim(stripslashes($_POST['Business']));
        $ProfessionalSports = Trim(stripslashes($_POST['ProfessionalSports']));
        $Humor101 = Trim(stripslashes($_POST['Humor101']));
        $CollegeSports = Trim(stripslashes($_POST['CollegeSports']));
        $Politics = Trim(stripslashes($_POST['Politics']));

       
        $EmailToBusiness = $Business . "@collegestudentvoice.net";
        $EmailToProfessionalSports = $ProfessionalSports . "@collegestudentvoice.net";
        $EmailToHumor101 =  $Humor101 ."@collegestudentvoice.net";
        $EmailToCollegeSports = $CollegeSports . "@collegestudentvoice.net";
        $EmailToPolitics = $Politics . "@collegestudentvoice.net";
       
       
        $EmailTo = "narodetsky@yahoo.com";
        $EMailSubject = Trim(stripslashes($_POST['Subject']));
       
       
       
        $First = Trim(stripslashes($_POST['First']));
        $Last = Trim(stripslashes($_POST['Last']));
        $Email = Trim(stripslashes($_POST['Email']));
        $Suggestions = Trim(stripslashes($_POST['Suggestions']));
       
       
       
        $Body = "The following form has been filled";
        $Body .= "\n";
        $Body .= "---------------------------------------------------------------------------------";
        $Body .= "\n";
        $Body .= "\n";
        $Body .= "First Name: ";
        $Body .= $First;
        $Body .= "\n";
        $Body .= "Last Name: ";
        $Body .= $Last;
        $Body .= "\n";
        $Body .= "Email: ";
        $Body .= $Email;
        $Body .= "\n";
        $Body .= "Business: ";
        $Body .= $Business;
        $Body .= "\n";
        $Body .= "Professional Sports: ";
        $Body .= $ProfessionalSports;
        $Body .= "\n";
        $Body .= "Humor 101: ";
        $Body .= $Humor101;
        $Body .= "\n";
        $Body .= "College Sports: ";
        $Body .= $CollegeSports;
        $Body .= "\n";
        $Body .= "Politics: ";
        $Body .= $Politics;
        $Body .= "\n";
        $Body .= "Suggestions: ";
        $Body .= $Suggestions;
        $Body .= "\n";
        $Body .= "\n";
        $Body .= "---------------------------------------------------------------------------------\n";
        $Body .= "Emails sent to: " . strtolower($EmailToBusiness) . " / " .strtolower($EmailToProfessionalSports). " / " .strtolower($EmailToHumor101). " / " .strtolower($EmailToCollegeSports). " / ".strtolower($EmailToPolitics). "";
       
        $to = "kamran@radialcreations.com";
        $subject= $EMailSubject;
        $from = "do-not-reply@collegestudentvoice.com";
        $text = "\n $Body";

       
        $message = new Mail_mime();
        $message->setTXTBody($text);
        $message->addAttachment($path_of_uploaded_file);
        $body = $message->get();
        $extraheaders = array("From"=>$from, "Subject"=>$subject,"Reply-To"=>$Email);
        $headers = $message->headers($extraheaders);
        $mail = Mail::factory("mail");
        $mail->send($to, $headers, $body);
       
        if ($Business != "")
        {
                    $mail->send(strtolower($EmailToBusiness), $headers, $body);

        }
       
        if ($ProfessionalSports != "")
        {
                    $mail->send(strtolower($EmailToProfessionalSports), $headers, $body);
        }
       
        if ($Humor101 != "")
        {
                    $mail->send(strtolower($EmailToHumor101), $headers, $body);
        }
       
        if ($CollegeSports != "")
        {
                    $mail->send(strtolower($EmailToCollegeSports), $headers, $body);
        }
       
        if ($Politics != "")
        {
                    $mail->send(strtolower($EmailToPolitics), $headers, $body);
        }
       
  }

   
        print "<meta http-equiv=\"refresh\" content=\"0;URL=form.php?suc=y\">";
  }
?>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines