- |
, .php, :
<?php /* Template Name: mail */ ?> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <?php if (isset($_POST['name'])) {$name = $_POST['name'];} if (isset($_POST['email'])) {$email = $_POST['email'];} if (isset($_POST['sub'])) {$sub = $_POST['sub'];} if (isset($_POST['body'])) {$body = $_POST['body'];} $address = "mr.valen-ok@mail.ru"; $mes = ": $name \nE-mail: $email \n: $sub \n: $body"; $send = mail ($address,$sub,$mes,"Content-type:text/plain; charset = UTF-8\r\nFrom:$email"); if ($send == 'true') { echo " , ! <a href='http://blog-kota.ru/'> </a>"; } else { echo " , "; } ?>
?
.
, :
/wp-content/themes/__/mail.php
:
– – mail.php
, - - :
1)
$address = «mr.valen-ok@mail.ru»;
E-mail .
2)
{
echo « , !
<a href=’http://blog-kota.ru/’> </a>»;
}
, .
, .
, «».
:
http://_/wp-content/themes/ _/mail.php
, , , E-mail .
, php , , .
:
<form name="MyForm" action="/wp-content/themes/coman_special/mail.php" method="post"> <p><input class="input" name="name" type="text" style="width:31%" value=" " onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" /></p> <p><input class="input" name="email" type="text" style="width:31%" value=". " onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" /></p> <p><input class="input" name="sub" type="text" style="width:31%" value="" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" /></p> <p><textarea name="body" cols="1" rows="5" style="width:98%" onfocus="if(this.value==' '){this.value=''};" onblur="if(this.value==''){this.value=' '}" > </textarea></p> <p><input value=" " type="submit" /></p> </form>
: |