کمک ajax تعداد بازدیدvisits : 263
|
|||||||||
karen54
![]() ![]() ![]()
|
کمک ajax سلام این کجاش مشکل داره ؟؟؟؟ کد: <form class="contact-form"><input type="text" placeholder="Enter your name..." name="name" id="name"><br><input type="text" placeholder="Enter your E-mail adress..." name="email" id="email"><br><textarea cols="10" rows="5" placeholder="Enter your message..." name="text" id="text"></textarea><br><input type="submit" value="Submit"><br><span id="result"></span></form> کد: $(".contact-form").click(function() {var data = { name: $("#name").val(), email: $("#email").val(), text: $("#text").val() } $.ajax({ url: "comments.php", type: "POST", data: data, statusCode:{ success: function (){ $(".result").text("Successfuly Sent!"); } } }); کد: <?php$name = $_GET["name"];$email = $_GET["email"];$text = $_GET["text"];$con = mysqli_connect("localhost","root","","moisrex");$sql = "insert into comments (`name`,`email`,`text`) values ($name , $email , $text)";mysqli_query($con,$sql);mysqli_close($con);return true;?> |
||||||||
پنجشنبه 06 شهریور 1393 - 20:06 |
|
karen54
![]() ![]() ![]()
|
پاسخAnswer 1 : کمک ajax چرا هیچ کس منو آدم حساب نمیکنه:دی |
||||||||
پنجشنبه 06 شهریور 1393 - 21:10 |
|
admin
![]() ![]() ![]() ![]() ![]() ![]()
|
پاسخAnswer 2 : کمک ajax این قطعا سر تاپاش مشکله :دی یه جا درست بذارش کدهاش اینقدر شلخته پلخته نیان :دی با تشکر ![]() ![]() ![]() !Whatever you DISRESPECT, you'll never have the ability to ACCESS
|
||||||||
پنجشنبه 06 شهریور 1393 - 21:12 |
|