form email: control to send an email

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
kyle04
New php-forum User
New php-forum User
Posts: 94
Joined: Sat Jul 07, 2012 1:36 pm

Re: form email: control to send an email

Post by kyle04 » Tue Sep 25, 2012 2:43 pm

Presuming you are using the form post method :

Code: Select all

<form method=POST action="myscript.php">
Autorizzo&nbsp;  <input name="privacy_si" type="radio" value="autorizzo" checked=""> &nbsp;
Non autorizzo <input type="radio" name="privacy_si" value="non autorizzo">
<input type=submit name="submit">
</form>
myscript.php :


<?

if(isset($_POST['submit'])) {
$privacy = $_POST['privacy_si'];

if($privacy=="autorizzo") {

// do email stuff
}

else {

echo "your privacy message here";

}
} // if
?>

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest