Ning Ma blog

my technology tips


Memory Game

Game link: Download Demo: “Memory game is a card game in which all of the cards are laid face down on a surface and two cards are flipped face up over each turn. The object of the game is to turn over pairs of matching cards.” I used half day to program this […]

Apache show only error logs

PHP provides various levels of error reporting using a bit-field as follows: Error Bit Purpose E_ALL All errors and warnings (doesn’t include E_STRICT) E_ERROR Fatal run-time errors E_WARNING Run-time warnings (non-fatal errors) E_PARSE Compile-time parse errors E_NOTICE Run-time notices (these are warnings which often result from a bug in your code, but it’s possible that […]

Uploadprogress PHP extension tutor

When it comes to uploading files, users expect visual feedback, usually in the form of a progress bar. The problem is that PHP doesn’t offer a way to track file uploads in progress by default. Fortunately, there is an extension that enables this functionality and this tutorial will show how it can be combined with […]

JQuery Ajax post all fileds values example

Basic usage of .ajax would look something like this: HTML:


PHP (i.e. form.php):

Note: Always sanitize posted data, to prevent injections and other malicious code. You could also use the shorthand .post in place of .ajax in the above JavaScript code:

Note: While the above JavaScript will work in jQuery […]

A good example to understand MVC for PHP

Questions about MVC spread everywhere around, and I found myself difficult to learn what it was about. I guess I am going to write a quick introduction because I really think it’s easy to understand if you have the right informations at your disposal. What you need to know to understand MVC Before trying to […]

JQuery PHP MYSQL login panel example

View demo click here Download demo This is a cool simple login / registration system. It will give you the ability to easily create a member-only area on your site and provide an easy registration process. It is going to be PHP driven and store all the registrations into a MySQL database. To add the […]

, ,

Ajax Jquery and PHP contact form example

View demo click here Download demo

We use the $_SESSION array to populate the values of the input fields. This is done to insure that the data is not lost during page redirects, which occur when the form is submitted to submit.php during the regular form submit. Another important aspect are the classes assigned […]

JQuery gallery with pop up and next button

View demo click here Download demo PHP The idea is simple – our PHP back-end is going to scan a folder that we’ve set up with our gallery images, and turn it into a fancy CSS & jQuery gallery. The great thing about this strategy is that it is incredibly easy to set up a […]

A simple site design by PHP and AJAX

View demo click here Download demo Home page

JQUERY The .ready() method is generally incompatible with the attribute. If load must be used, either do not use .ready() or use jQuery’s .load() method to attach load event handlers to the window or to more specific items, like images. Note how, on line 3, […]

Twitter and weibo example by PHP JQuery and AJAX

View demo click here Download demo Creating the DB If you’d like to run a working demo on your own site, you will have to create a MySQL table where all your tweets are going to be stored. You can run the following SQL code through phpMyAdmin (the code is also available in table.sql in […]

Previous Posts Next posts