Grazie goikiu ma sono talmente impedito che mi esce sempre la scritta NOME nella mail che ricevo e basta.Volevo chiederti se gentilmente potevi vedere se ho scritto giusto il codice PHP(ho dei dubbi).
Qui c'è il codice html
codice:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>CSS3 Contact Form</title> <link href="contact.css" rel="stylesheet" type="text/css"> </head> <body> <div id="contact"> <h1>contattaci</h1> <form action="form.php" method="post" target="new"> <fieldset> <label for="name">NOME :</label> <input type="text" id="name" placeholder="Inserisci il tuo nome" /> <label for="email">Email :</label> <input type="email" id="email" placeholder="Inserisci la tua mail" /> <label for="message">Messaggio:</label> <textarea id="message" placeholder="Scrivi il tuo messaggio"></textarea> <input type="submit" value="INVIA" /> </fieldset> </form> </div> </body> </html>
Qui quello PHP
Codice PHP:
<?php /*inizio form di contatto php*/ $destinatario = "tanasuke@shibamania.it"; $name = $_POST['name']; $oggetto = "Email inviata da shibamania"; $name = $_POST['name']; $messaggio = "Nome $nome\n"; $messaggio .= $testo; $name = $_POST['name']; $da = $email; $intestazioni = "From: $da"; $name = $_POST['name']; mail($destinatario,$oggetto,$messaggio,$intestazioni); /*fine form di contattophp*/ ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>form</title> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> Grazie per avermi contattato </body> </html>
e qui se serve,ma non credo anche il CSS
codice:
body, div, h1, form, fieldset, input, textarea { margin: 0; padding: 0; border: 0; outline: none; } html { height: 100%; } body { background: #728eaa; background: -moz-linear-gradient(top, #25303C 0%, #728EAA 100%); /* firefox */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#25303C), color-stop(100%,#728EAA)); /* webkit */ font-family: sans-serif; } #contact { width: 430px; margin: 60px auto; padding: 60px 30px; background: #3f3f3f; border: 1px solid #000000; -moz-box-shadow: 0px 0px 8px #444; -webkit-box-shadow: 0px 0px 8px #444; } h1 { font-size: 35px; color: #CCCCCC; text-transform: uppercase; text-align: center; margin: 0 0 35px 0; text-shadow: 0px 1px 0px #f2f2f2; } label { float: left; clear: left; margin: 11px 20px 0 0; width: 95px; text-align: right; font-size: 16px; color: #FFFFFF; text-transform: uppercase; text-shadow: 0px 1px 0px #f2f2f2; } input { width: 260px; height: 35px; padding: 5px 20px 0px 20px; margin: 0 0 20px 0; background: #5E768D; background: -moz-linear-gradient(top, #546A7F 0%, #5E768D 20%); /* firefox */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#546A7F), color-stop(20%,#5E768D)); /* webkit */ border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -moz-box-shadow: 0px 1px 0px #f2f2f2;-webkit-box-shadow: 0px 1px 0px #f2f2f2; font-family: sans-serif; font-size: 16px; color: #f2f2f2; text-transform: uppercase; text-shadow: 0px -1px 0px #334f71; } input::-webkit-input-placeholder { color: #a1b2c3; text-shadow: 0px -1px 0px #38506b; } input:-moz-placeholder { color: #a1b2c3; text-shadow: 0px -1px 0px #38506b; } textarea { width: 260px; height: 170px; padding: 12px 20px 0px 20px; margin: 0 0 20px 0; background: #5E768D; background: -moz-linear-gradient(top, #546A7F 0%, #5E768D 20%); /* firefox */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#546A7F), color-stop(20%,#5E768D)); /* webkit */ border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -moz-box-shadow: 0px 1px 0px #f2f2f2;-webkit-box-shadow: 0px 1px 0px #f2f2f2; font-family: sans-serif; font-size: 16px; color: #f2f2f2; text-transform: uppercase; text-shadow: 0px -1px 0px #334f71; } textarea::-webkit-input-placeholder { color: #a1b2c3; text-shadow: 0px -1px 0px #38506b; } textarea:-moz-placeholder { color: #a1b2c3; text-shadow: 0px -1px 0px #38506b; } input:focus, textarea:focus { background: #728eaa; background: -moz-linear-gradient(top, #668099 0%, #728eaa 20%); /* firefox */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#668099), color-stop(20%,#728eaa)); /* webkit */ } input[type=submit] { width: 185px; height: 52px; float: right; padding: 10px 15px; margin: 0 15px 0 0; -moz-box-shadow: 0px 0px 5px #999;-webkit-box-shadow: 0px 0px 5px #999; border: 1px solid #556f8c; background: -moz-linear-gradient(top, #718DA9 0%, #415D79 100%); /* firefox */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#718DA9), color-stop(100%,#415D79)); /* webkit */ cursor: pointer; }
Grazie mille per l'aiuto!Ciao