phpClasses and Jquery
-
Upload
raphael-wanjiku -
Category
Technology
-
view
763 -
download
0
description
Transcript of phpClasses and Jquery
![Page 1: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/1.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/2.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/3.jpg)
1. Create a database connection class..lets call it DbConnection.php
2. Create a user class …User.php
![Page 4: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/4.jpg)
![Page 5: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/5.jpg)
![Page 6: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/6.jpg)
![Page 7: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/7.jpg)
![Page 8: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/8.jpg)
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](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/9.jpg)
Pointing to the useclass.php containing switches
Pointing to the register case within the switch
![Page 10: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/10.jpg)
Loginform.php
Welcomepage.php
![Page 11: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/11.jpg)
![Page 12: phpClasses and Jquery](https://reader033.fdocuments.in/reader033/viewer/2022060202/559c71691a28ab63708b466a/html5/thumbnails/12.jpg)
For the source code..visit my shared box repository https://app.box.com/s/sgpg1cg4gkfp7v7ft6zo
Hope this helps!!