Page 1 of 1

JQuery / Ajax

Posted: Thu Jul 15, 2010 8:41 pm
by Gebbo
Hello

Does anyone know where I can get a good tutorial on how to build a php ajax / jquery login / registration system ?

Posted: Fri Jul 16, 2010 12:09 am
by Freedom Fighter

No Problem. There are many resources out there but i find these to be the
most informative

::AJAX::
http://www.w3schools.com/ajax/default.asp

::JQUERY::
http://www.w3schools.com/jquery/default.asp




Posted: Sun Jul 18, 2010 11:12 pm
by Gebbo
Freedom Fighter wrote:
No Problem. There are many resources out there but i find these to be the
most informative

::AJAX::
http://www.w3schools.com/ajax/default.asp

::JQUERY::
http://www.w3schools.com/jquery/default.asp



Ive read those alwready but I was looking for more specific tutorials related to login to see what kind of methods people use. By methods i mean more specifically related to the Ajax, jquery part not the php part.

How to get the data from the forms*
How to send the data from the forms to the php file and how to receive a response

Posted: Mon Jul 19, 2010 12:18 am
by Freedom Fighter

It is very hard to find tutorials specific to a function for the new languages.
I would suggest looking around for free login scripts of forum scripts witch use Ajax and picking it apart.

I have learned tonnes by learning from example.

jquery

Posted: Wed Jul 28, 2010 12:17 am
by Gebbo
Thanks, I found a nice tutorial which showed me how to use $.post() and $.get() jquery functions which helped me out a lot. Jquery is really neat!

Posted: Fri Jul 30, 2010 9:57 am
by Freedom Fighter

Nice, I havent quite stepped into that realm yet but most likely soon!

Ajax

Posted: Fri Jul 30, 2010 2:46 pm
by Gebbo
You should, its really really simple, I mean for a login you would just do

Index.html

<script - >
$(****).ready(function() {
$.post("login.pgp",{Username: $("#username").val(), Password: $("#password").val(),function(data) {
if(data == "Success") $("body").append("You have loagged in"); $("#loginform").css("display","none");
// Dosplay the login class (Default - Hidden)
$(".loginpage").css("display","block");
// Load the members page data
$(".loginpage").load("loginpage.php");
});

</script - >

Login.php

if($_POST['']) {
// Proceeed with regular php scripting
echo 'Success';
}


Thats just a messy example but its as simple as that! Jquery for the Win! Check it out, Im sure you will find something neat for your website!