,  , PHP

 
 
0 / 0 / 0
: 09.06.2018
: 6
1

10.06.2018, 00:42. 177. 3
( )

, , , (, ). !
0
? .
Similar
41792 / 34177 / 6122
: 12.04.2006
: 57,940
10.06.2018, 00:42
:


Web builder. ...

!
! , PHP , ...


, ....

Captcha
. ...


index html: <form class="form-2 ord-form" style="position:...

3
Sound84
8 / 8 / 9
: 05.03.2018
: 49
10.06.2018, 09:25 2
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<form action="  " method="post">
:*
<input name="name" type="text" size="20" maxlength="50" /><br /><br />
 
E-mail  :*
<input name="mail_back" type="text" size="20" maxlength="50" /><br /><br />
 
 :*
<input name="sabject" type="text" size="20" maxlength="50" /><br /><br />
 
:*<br />
<textarea name="text" cols="40" rows="10"></textarea><br /><br />
 
<input name="submit" type="submit" value="" />
</form>
php

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*    if       $_POST    .*/ 
if (isset($_POST['name']))      {$name = $_POST['name'];}  
if (isset($_POST['mail_back'])) {$mail_back = $_POST['mail_back'];}  
if (isset($_POST['sabject']))   {$sabject = $_POST['sabject'];}  
if (isset($_POST['text']))      {$text = $_POST['text'];}  
 
 
if (isset($_POST['submit']))  //      
{  
//      
if (empty($name) and empty($mail_back) and empty($sabject) or empty($text))   
{  
//            
<input name='back' type='button' value='' onclick='javascript:self.back();'>"); 
  
exit ("<p>         !!!</p>  
//    
}   
 
/*    trim           */   
$name      = trim($name);  
$mail_back = trim($mail_back);  
$sabject   = trim($sabject);  
$text      = trim($text);  
 
/*   stripslashes           */
$name      = stripslashes($name);  
$mail_back = stripslashes($mail_back);  
$sabject   = stripslashes($sabject);  
$text      = stripslashes($text);  
 
/*   htmlspecialchars   html  ,    */ 
$name     = htmlspecialchars($name);  
$mail_back = htmlspecialchars($mail_back);  
$sabject = htmlspecialchars($sabject);  
$text = htmlspecialchars($text);  
 
/*       */  
$my_mail = "my_mail@mail.ru";  
 
/*  */ 
$pismo = " ".$name.$text;  
 
/*       */  
$result = mail ($my_mail,$sabject,$pismo,"Content-type:text/plain;Charset=UTF-8
");  
 
/*     */ 
if ($result == true) { 
echo "<html><head>  
<meta http-equiv='Refresh' content='2; URL=/'>  
</html></head>    ,    .";  
} else {  
echo "<html><head>  
<meta http-equiv='Refresh' content='2; URL=/'>  
</html></head>      .";  
} 
} else  { 
/*     ,        .*/  
echo "<html><head>  
<meta http-equiv='Refresh' content='0; URL=/'>  
</html></head>";  
exit ();  
}
!
0
0 / 0 / 0
: 09.06.2018
: 6
10.06.2018, 15:32  [] 3
! ?

3 30

/*ƒ‚ € ‰ €‚€ if ‚€ ‚Œ ‹  $_POST ‚€‹ ‚€  „€‹.*/
if (isset($_POST['name'])) {$name = $_POST['name'];}
if (isset($_POST['mail_back'])) {$mail_back = $_POST['mail_back'];}
if (isset($_POST['sabject'])) {$sabject = $_POST['sabject'];}
if (isset($_POST['text'])) {$text = $_POST['text'];}


if (isset($_POST['submit'])) //Ÿ€€ ‚ ‡ ‚€‚Œ
{
//ƒ‚ ‚€   ‹
if (empty($name) and empty($mail_back) and empty($sabject) or empty($text))
{
//• ƒŒ ‚ ˆ Œ‚Ž
<input name='back' type='button' value='' onclick='javascript:self.back();'>");

exit ("<p>’‹ Ž „€†Ž €‚Œ €ƒ‚ !!!</p>
// ‚ €‚ƒ €‚
}

/*ƒ‚ € ‰ „ƒ† trim € €‹ ‡ † ‚‚ ‚€‹ Œ‚Œ*/
$name = trim($name);
$mail_back = trim($mail_back);
$sabject = trim($sabject);
$text = trim($text);

/*ƒ‚  ‰ŒŽ stripslashes ˆ † ‹  ‚‚ ‚ ƒ‚ †… ‚*/
$name = stripslashes($name);
$mail_back = stripslashes($mail_back);
$sabject = stripslashes($sabject);
$text = stripslashes($text);

/*ƒ‚  ‰ŒŽ htmlspecialchars  ‹ html ‚‚, ‚ †… ‚*/
$name = htmlspecialchars($name);
$mail_back = htmlspecialchars($mail_back);
$sabject = htmlspecialchars($sabject);
$text = htmlspecialchars($text);

/*ƒ‚ ‚ € ‚€‹ ƒ ‚€‚Œ Œ*/
$my_mail = "fataliev.g@yandex.ru";

/*‚ Œ */
$pismo = "’ ˆ‚".$name.$text;

/*€Œ ‚€  Œ  ‡‚ƒ*/
$result = mail ($my_mail,$sabject,$pismo,"Content-type:text/plain;Charset=UTF-8
");

/*€Œ €€ ƒˆ Œ ‚*/
if ($result == true) {
echo "<html><head>
<meta http-equiv='Refresh' content='2; URL=/'>
</html></head>  ˆ Œ ‚€, ‹  .";
} else {
echo "<html><head>
<meta http-equiv='Refresh' content='2; URL=/'>
</html></head> ŸŒ ‚€ €ƒ‚ ƒ‚ .";
}
} else {
/*ƒ‚ ‚€ ƒŽ ‚€†ƒ Œ‚,  ‚€‚Œ „€ ‹ ‚.*/
echo "<html><head>
<meta http-equiv='Refresh' content='0; URL=/'>
</html></head>";
exit ();
}

19

"); exit ("

’‹ Ž „€†Ž €‚Œ €ƒ‚ !!!
// ‚ €‚ƒ €‚ } /*ƒ‚ € ‰ „ƒ† trim € €‹ ‡ † ‚‚ ‚€‹ Œ‚Œ*/ $name = trim($name); $mail_back = trim($mail_back); $sabject = trim($sabject); $text = trim($text); /*ƒ‚  ‰ŒŽ stripslashes ˆ † ‹  ‚‚ ‚ ƒ‚ †… ‚*/ $name = stripslashes($name); $mail_back = stripslashes($mail_back); $sabject = stripslashes($sabject); $text = stripslashes($text); /*ƒ‚  ‰ŒŽ htmlspecialchars  ‹ html ‚‚, ‚ †… ‚*/ $name = htmlspecialchars($name); $mail_back = htmlspecialchars($mail_back); $sabject = htmlspecialchars($sabject); $text = htmlspecialchars($text); /*ƒ‚ ‚ € ‚€‹ ƒ ‚€‚Œ Œ*/ $my_mail = "fataliev.g@yandex.ru"; /*‚ Œ */ $pismo = "’ ˆ‚".$name.$text; /*€Œ ‚€  Œ  ‡‚ƒ*/ $result = mail ($my_mail,$sabject,$pismo,"Content-type:text/plain;Charset=UTF-8 "); /*€Œ €€ ƒˆ Œ ‚*/ if ($result == true) { echo "  ˆ Œ ‚€, ‹  ."; } else { echo " ŸŒ ‚€ €ƒ‚ ƒ‚ ."; } } else { /*ƒ‚ ‚€ ƒŽ ‚€†ƒ Œ‚,  ‚€‚Œ „€ ‹ ‚.*/ echo " "; exit (); } ?>
0
Sound84
8 / 8 / 9
: 05.03.2018
: 49
11.06.2018, 19:13 4
?
0
MoreAnswers
37091 / 29110 / 5898
: 17.06.2006
: 43,301
11.06.2018, 19:13

?
! - , , ...


. ).. ...

.
. . ...




:
4

- , ,
-
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
@Mail.ru