Hi guys,
i’m trying to create simple site that you can put in score for the games and send that information via email (it would be nice to have the predection for each users available on the site to, but then i need to create db connection. Its not neccasary but would be cool
below is the HTML and the PHP code i’m trying to work with, i would like to make users insert numbers to field rather then checkboxes. Any ideas how i can do that?
Any help is much appreciated
(Index.html)
Nafn | |
Games (check all that apply) |
Frakkland Þýskaland |
*Comments | |
(Send_form_email.php)
<?php error_reporting(-1); ini_set('display_errors', 'On'); if(isset($_POST['name'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "[email protected]"; $email_subject = "subject"; $email_from = "[email protected]"; $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Nafn: ".clean_string($_POST["name"])."\n"; $email_message .= "Lið: ".implode(" ", $_POST['services'])."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($email_to, $email_subject, $email_message, $headers); ?>Thank you.
HOME <?php } ?>