Jump to content

Securing a php mail form with variables sent from flash form


Stand Still

Recommended Posts

Hey Guys, I am totally oblivious to php stuff, but I know I need some security on the forms I use. What I do is make my forms in flash and send the variables to a php file that in turn sends them to a specified email...pretty simple. So, below is the php script and if someone could show me how to place some security either in that script or how to point it to some or whatever is easiest and safe... oh, I'd be ecstatic!

 

<?php

 

$name = $HTTP_POST_VARS['Name'];

$email = $HTTP_POST_VARS['Email'];

$phone = $HTTP_POST_VARS['Phone'];

$address = $HTTP_POST_VARS['Address'];

$county = $HTTP_POST_VARS['County'];

$message = $HTTP_POST_VARS['Message'];

 

$message = stripslashes($message);

 

$sendTo = "[email protected]";

$subject = "Some Contact Information!";

 

$msg_body = "Name: $name\n";

$msg_body .= "E-Mail: $email\n";

$msg_body .= "Phone: $phone\n";

$msg_body .= "Address: $address\n";

$msg_body .= "County: $county\n";

$msg_body .= "Message: $message\n";

 

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

 

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

 

?>

 

Remember, I'm new to all this and need the "Blind Dog" instructions (meaning explain it so a blind dog could do it). Thanks so much.

 

-Mike

 

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.