? ????????????? PHP
?????? ? ???????
? ???? ??????? ???????? ??? ? PHP ????? ???????????? ?????? ? HTML - ????.
???????? ??????? HTML ????.
lt; HTML gt;
lt; HEAD gt;
lt; TITLE gt; ?????? ?????????? lt;/TITLE gt;
lt; BODY gt;
lt; CENTER gt;
?????? ?????? ????? ? ????? ????????
lt; P gt;
lt; TABLE WIDTH=400 gt; lt; TR gt; lt; TD align=right gt;
lt; FORM ACTION= email.php METHOD= POST gt;
???? ???: lt; BR gt; lt; INPUT TYPE= text NAME= name SIZE= 20 MAXLENGTH= 30 gt;
lt; P gt;
??? email: lt; BR gt; lt; INPUT TYPE= text NAME= email SIZE= 20 MAXLENGTH= 30 gt;
lt; P gt;
???? ??????????:
lt; SELECT NAME= preference gt;
lt; OPTION value= ?????? gt; ??????
lt; OPTION value= ????????? gt; ?????????
lt;/SELECT gt;
lt; P gt;
lt; INPUT TYPE= submit VALUE= ????????? ??????! gt;
lt;/FORM gt;
lt;/TD gt; lt;/TR gt; lt;/TABLE gt; lt;/CENTER gt;
lt;/BODY gt;
lt;/HTML gt;
??????? ???? ???? request.html. ? ??? ?? ???????, ??? ?????? ????? ????? ?????????????? ?????? email.php. ???????? ??? ??????????:
lt;?
/* ???? ?????? ???????? ?????????? ?? request.html */
PRINT lt; CENTER gt; raquo ;; ??????, . $ _ POST [ name ];
PRINT lt; BR gt; lt; BR gt; raquo ;; ??????? ?? ??? ???????. lt; BR gt; lt; BR gt; raquo ;;
PRINT ??? ?????????? . $ _ POST [ preference ]." ,
?????????? ? ??? ?? ?????? ??? ?? email: . $ _ POST [ email ]; PRINT lt;/CENTER gt;" ;
? gt;
??????, ???? ???????????? ??????? request.html? ??????? ? ????? ??? ???? , Email: vasya@pupkin? ??????, ??? ??? ?????????? ?????? ,? ????? ????? ?????? ????????? ??????! raquo ;, ?? ? ????? ????????? email.php, ??????? ??????? ?? ????? ???????? ?????????:
??????, ????
??????? ?? ??? ???????.
??? ?????????? ??????. ?????????? ? ??? ?? ?????? ??? ?? email: vasya@pupkin
?????? ?? ?????? ???????? ???????? ? ??????? email.
??? ????? ? PHP ???? ??????? MAIL.
?????????:
(,, string message, string add_headers);
to - email ????? ??????????. subject - ???? ??????. message - ?????????? ????? ????????? ._ headers - ?????? ????????? ????????? ?????? (?????????????? ????????).
??????? ? ????? ????? email.php ????????? ???:
lt;? php
$ subj= ?????? ?? ?????????? raquo ;;
$ text= ????????? . $ _ POST [ name ]." !
??????? ?? ??? ???????!
??? ?????????? . $ _ POST [ preference ].
?? ?? ?????????????? ?????????.
?????????? ? ????????? ?????? ????? ???????? ? ???????? ???? ????? ????????." ;
mail ($ _ POST [ email ], $ subj, $ text);
$ subj= ???????? ?????? ?? ?????????? raquo ;;
$ text=$ _POST [ name ]. ???????????? . $ _ POST [ preference ]. email - ?????: . $ _ POST [ email ];
mail ($ adminaddress, $ subj, $ text);
? gt;
??? ?????? ???????????? ????? ???????? ?????? ? ????? ????????? ??????????? ? ????? ???????. ????? ?????? ??????? ? ????????????? ?????. (?????????? 4)
????? ?????????????? ?????? ???????? ?????? ????? ?????, ?? ??????? ?? ??? - ?? ??????????? ? ??????? ?????????? ? ??? ? ???? ??????. ??? ??? ??? ?? ????? ????????? ? ????????? ???????.
1.8 ?????? ? MySQL (?????????? ??????? ???? ??????)
??? ?????? ??????? ???? ?????? ? ???????. ...