form email: control to send an email

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

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

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">
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