|
|
|
помощь в ajax
|
|||
|---|---|---|---|
|
#18+
Всем здравствуйте. Есть два файла post.php<?php error_reporting(0); session_start(); $login = htmlspecialchars($_POST['login']); $email = htmlspecialchars($_POST['email']); $msg = htmlspecialchars($_POST['msg']); $captcha = htmlspecialchars($_POST['ct_captcha']); ////// $errors = 0; //if(empty($captcha)){ //$errors = 1; //$page = 'Капча не введена!'; //}; ////// require_once 'capt/securimage.php'; $securimage = new Securimage(); if ($securimage->check($captcha) == false) { $errors = 1; $page = 'Капча... Неверный код!'; } ////// if(empty($msg)){ $errors = 1; $page = 'Сообщение пустое!'; }; if(empty($email)){ $errors = 1; $page = 'Мыло пустое!'; }; if(empty($login)){ $errors = 1; $page = 'Логин пустой!'; }; ///// Код Successa if ($errors == 0){ // $title = 'В Службу Поддержки VR-team'; $mess = " " . "Имя на VR-team: $login" . "Email: $email" . "IP Адрес отправителя: {$_SERVER['REMOTE_ADDR']}" . "Cообщение:" . "$msg<"; $to = 'support@vr-team.ru'; $from=$email; mail($to, $title, $mess, 'From:'.$from); // $page = 'Письмо отправлено!'; }; ///// echo $page; ?> и соответственно index.php<?php session_start(); ?> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-style-type" content="text/css"> <meta http-equiv="content-language" content="ru-ru"> <meta http-equiv="Cache-Control" content="private"> <meta http-equiv="Pragma" content="no-cache"> <link href="/style.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="/jquery.form.min.js"></script> <script type="text/javascript" src="/jquery.min.js"></script> <title>VR-team - Support</title> </head> <body> <div class="center"> <div class="capt"><h3>VR-team - Support</h3></div> <div class="panelback"> <div class="panel" style="text-align: center;"> Вас приветствует Служба Поддержки VR-team. <br /> <div id="sendresult"></div> <form action="/post.php" id="sendform" method="post" > <div style="display: none;" id="writeus"> <br />Ник на VR-team:<br /> <input type="text" name="login" class="textinput"/> <br />Ваш e-mail:<br /> <input type="text" name="email" class="textinput"/> <br />Сообщение:<br /> <textarea name="msg" class="txtin textinput"></textarea> <br />В целях безопасности:<br /> <p> <img id="siimage" style="border: 1px solid #000; margin-right: 15px" src="./capt/securimage_show.php?sid=<?php echo md5(uniqid()) ?>" alt="CAPTCHA Image" align="center" /> <a tabindex="-1" style="border-style: none;" href="#" title="Обновить код" onclick="document.getElementById('siimage').src = './capt/securimage_show.php?sid=' + Math.random(); this.blur(); return false"><img src="./capt/images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0" /></a><br /> <br><br />Введите код с картинки:<br /> <input type="text" name="ct_captcha" size="12" maxlength="8" class="textinput"/> </p> <br /><input type="submit" class="design" name="submit"> </form> </div> <br /> <a id="writeusbtn" class="design"><b>Написать нам</b><a/> </div> <script> $("#writeusbtn").click(function () { $("#writeus").show(1000); $("#writeusbtn").hide(1000); }); $('#sendform').ajaxForm( { success: function(html) { //$('#sendresult').html(html); //$("#sendresult").show(1000); } }); </script> </div> </div> </body> </html> Надо, чтобы форма работала полностью на аяксе, не было этого файла пост, а было все в индекс. Буду очень благодарен, если поможете ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.01.2013, 16:23 |
|
||
|
помощь в ajax
|
|||
|---|---|---|---|
|
#18+
По php не помогу, я его не знаю По ajax: http://api.jquery.com/jQuery.ajax/ там внизу есть примеры удачи ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.01.2013, 16:27 |
|
||
|
помощь в ajax
|
|||
|---|---|---|---|
|
#18+
мне не важно в чем оно будет: php, html, главное, чтобы работало, помогите, пожалуйста. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.01.2013, 16:36 |
|
||
|
помощь в ajax
|
|||
|---|---|---|---|
|
#18+
так я ж уже помог идете по ссылке, читаете и реализуете клиентскую часть на JavaScript а серверная часть - это php или Asp.Net но аж никак не html :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.01.2013, 16:38 |
|
||
|
помощь в ajax
|
|||
|---|---|---|---|
|
#18+
я не только вас же просил помочь, может еще кто напишет. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.01.2013, 16:40 |
|
||
|
помощь в ajax
|
|||
|---|---|---|---|
|
#18+
found1996я не только вас же просил помочь, может еще кто напишет.и пол помоет ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.01.2013, 12:04 |
|
||
|
помощь в ajax
|
|||
|---|---|---|---|
|
#18+
found1996мне не важно в чем оно будет: php, html, главное, чтобы работало, помогите, пожалуйста. судя по этому посту, автору следует почитать что-нибудь из классической теории по данной теме) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.01.2013, 13:25 |
|
||
|
|

start [/forum/topic.php?fid=22&msg=38099951&tid=1448896]: |
0ms |
get settings: |
7ms |
get forum list: |
10ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
168ms |
get topic data: |
7ms |
get forum data: |
2ms |
get page messages: |
31ms |
get tp. blocked users: |
1ms |
| others: | 220ms |
| total: | 452ms |

| 0 / 0 |
