Hallo Leute ich steh gerade etwas auf dem Schlauch:
Ich habe ein Formular und das passende Script erstellt aber leider wird alles außer der Auswahl der Radio Button übertragen:
HTML:
<form action="nummernvergabe.php" method="post" class="volunteer-form">
<div class="col-sm-6">
<div class="form-group">
<label for="name">Your Name</label>
<input type="text" id="name" name="name" class="form-control" value=""
placeholder="Your Name" required>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="email">Your Email</label>
<input type="email" id="email" name="email" class="form-control" value=""
placeholder="Email Address" required>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="phone_number">Phone Number</label>
<input type="text" id="phone_number" name="phone_number" class="form-control"
value="" placeholder="Phone Number">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="phone_number">Markt</label><br>
<input type="radio" name="Markt" value="Lady" /><font color="#EA4E46"> Lady</font><br>
<input type="radio" name="Markt" value="Kind" /><font color="#FAB743"> Kind</font><br>
<input type="radio" name="Markt" value="Lady/Kind" /><font color="#3BAE6C"> Lady und Kind</font><br>
</div>
</div>
PHP:
<?php
function sonderzeichen($string)
{
$string = str_replace("ä", "ae", $string);
$string = str_replace("ü", "ue", $string);
$string = str_replace("ö", "oe", $string);
$string = str_replace("Ä", "Ae", $string);
$string = str_replace("Ü", "Ue", $string);
$string = str_replace("Ö", "Oe", $string);
$string = str_replace("ß", "ss", $string);
$string = str_replace("´", "", $string);
return $string;
}
function utf8encodeArray($array)
{
foreach($array as $key => $value)
{
if(is_array($value))
{
$array[$key] = utf8encodeArray($value);
}
elseif(!mb_detect_encoding($value, 'UTF-8', true))
{
$array[$key] = utf8_encode($value);
}
}
return $array;
}
$to = 'nummernvergabe@holzheimer-kleidermarkt.de';
$name = $_POST["name"];
$email= $_POST["email"];
$phone= $_POST["phone_number"];
$text= "=?utf-8?b?".base64_encode($text)."?=";
$text= $_POST["message"];
$Markt= $_POST["value"];
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= "From: " . $email . "\r\n"; // Sender's E-mail
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$message ='<table>Eine Kundennummernanfrage:
<tr>
<td>'.$name.'</td>
</tr>
<tr><td>Email: '.$email.'</td></tr>
<tr><td>phone: '.$phone.'</td></tr>
<tr><td>Text: '.$text.'</td></tr>
<tr><td>Markt: '.$Markt.'</td></tr>
</table>';
?>