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 = "me@gmail.com";

$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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.