Jump to content

Needing some php help


liget

Recommended Posts

Hey guys I am having a problem getting my php form to work.  I am calling the form from a flash movie.  I have validated my php code in dreamweaver and get no errors or warnings. I am by far no expert at php, and hope some of you guys could help me out.  I did use swish to make this site if that helps any. I am going to post my code to call the php contact form, and the php contact form code.  Ohhh yeah.....the form is saved in the right directory to. Here is the code. 

 

on (rollOver) {
    gotoAndPlay("on");
}
on (rollOut) {
    gotoAndPlay("off");
}
on (release) {
    if (!_parent.Name.length) {
        _parent.Status = "Name Required";
    } else {
        if (!_parent.Email.length || _parent.Email.indexOf("@") == -1 || _parent.Email.indexOf(".") == -1) {
            _parent.Status = "Valid Email Required";
        } else {
            if (!_parent.Message.length) {
                _parent.Status = "Message Required";
            } else {
                _parent.Status = "";
                name = _parent.name;
                email = _parent.email;
                phone = _parent.phone;
                message = _parent.message;
                loadVariablesNum("Mail_Form.php",0,'POST');
                _parent.gotoAndPlay("submitted");
            }
        }
    }
}

 

Ok....here is the php code:

 

<?php

$name = $HTTP_POST_VARS['name'];
$email = $HTTP_POST_VARS['email'];
$phone = $HTTP_POST_VARS['phone'];
$message = $HTTP_POST_VARS['message'];

$name = stripslashes($name);
$email = stripslashes($email);
$phone = stripslashes($phone);
$message = stripslashes($message);

$rec_email = "[email protected]"; 
$subject = "Web Page Contact Form";

$msg_body .= "Name:  $name\n";
$msg_body .= "Phone Number:  $phone\n";
$msg_body .= "E-Mail:  $email\n";
$msg_body .= "Message:  $message\n";
$msg_body .= "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n";

$header_info = "From: ".$name." <".$email.">";

mail($rec_email, $subject, $msg_body, $header_info);

?>

 

Thanks everybody!!!!!!!

 

(edited by kenrbnsn to add


tags)

Link to comment
https://forums.phpfreaks.com/topic/138699-needing-some-php-help/
Share on other sites

ooops, I guess that would help.  I can't receive emails. I have tried it on two different servers both running PHP Version 5.x. This one has really stumped me.  I have also changed to post as opposed to get.  Still no changes.  The code will display a message sent in my flash movie also. Thanks!

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.