-
Book Overview & Buying
-
Table Of Contents
PHP jQuery Cookbook
By :
We will create an example where users will be able to vote for their favorite browsers. Once voted, they will not be able to vote for another day, that is 24 hours. Votes will be stored in an XML file. We will also display the votes in a nice graphical format.
XML file has been used just for the example. In real world applications, data will be loaded from databases or web services (which can return anything like XML, JSON, or any other format).
Create a folder named Recipe8 inside the Chapter5 directory.
OK. This recipe is going to be a bit long, so grab a mug of coffee and start. First of all, create an XML file in the Recipe8 folder and name it as browsers.xml. This file will have information about the browsers that we will display to the user.
<?xml version="1.0"?> <browsers> <browser name="Firefox" value="FF" votes="200"/> <browser name="Google Chrome" value="GC" votes="130"/> <browser name="IE" value...
Change the font size
Change margin width
Change background colour