phpclasses and jquery

12
USING JQUERY AND PHP CLASSES This tutorial gives a simple example of using Php Classes With Jquery for Ajax Implementation Enjoy!! Email: [email protected]

Upload: raphael-wanjiku

Post on 08-Jul-2015

770 views

Category:

Technology


0 download

DESCRIPTION

This tutorial gives an introduction of using php classes and Jquery.

TRANSCRIPT

Page 1: phpClasses and Jquery

USING JQUERY AND PHP CLASSES This tutorial gives a simple example of using Php Classes With Jquery for Ajax Implementation

Enjoy!!

Email: [email protected]

Page 2: phpClasses and Jquery

For quite sometime as a Jquery beginner ,I struggled to implement Ajax functionalities within my applications

especially using Php classes. After googling and analysis, I came up with this:it all lies within simple Switching….

We will develop a simple registration/login system using php class user

Page 3: phpClasses and Jquery

1. Create a database connection class..lets call it DbConnection.php

2. Create a user class …User.php

Page 4: phpClasses and Jquery
Page 5: phpClasses and Jquery
Page 6: phpClasses and Jquery
Page 7: phpClasses and Jquery
Page 8: phpClasses and Jquery

3. Create a php file that calls the various functions within your class ..call it userclass.php

4. Create your html pages..(registerform.php,loginform.php and the welcomepage.php)

Registerform.php

Page 9: phpClasses and Jquery

Pointing to the useclass.php containing switches

Pointing to the register case within the switch

Page 10: phpClasses and Jquery

Loginform.php

Welcomepage.php

Page 11: phpClasses and Jquery
Page 12: phpClasses and Jquery

For the source code..visit my shared box repository https://app.box.com/s/sgpg1cg4gkfp7v7ft6zo

Hope this helps!!