Ways to Manipulate Data/Web Pages (AJAX, PHP, etc.)

I learned the basics of AJAX just a few hours ago (created my first working example) and am really excited about the prospect of making my web pages more interactive. But before I jump in head first, I’d like to know what technologies besides AJAX can be used to do similar things. I work with PHP and MYSQL and would classify myself as an intermediate user.

So far I know about two methods:

  1. AJAX

  2. CSS - For example, you can assign certain table rows a class (e.g. “Disappear”), then create alternate style sheets that allow the user to fetch a style sheet that makes all those rows disappear.

Can you do similar things with PHP? I think I remember playing around with some sort of a PHP table switch years ago. I think it allowed the visitor to sort table rows a particular way, but I can’t remember the details.

It’s hard to Google “PHP switch” without getting tons of information about THESE switches…


switch($Gender)
{
 case 'Male':
 break;
 case 'Female':
 break;
 default:
 break;
}

In summary, I’m just looking for general tips about interactive pages. My hunch is that I’m going to be working primarily with AJAX and perhaps alternate style sheets, but are there some cool PHP interactive functions I should know about?

CSS has nothing to do with AJAX.

AJAX is basically calling a server side script without having to refresh the page. For example you could set a interval to get list of comments every few second to give the effect of having a live feed. This is called long polling if you were wondering.

I would use jQuery because it has a AJAX API that is really easy to send and get data from. More info http://api.jquery.com/jquery.ajax/.

Also a switch statement is just something you can use in PHP. It has no association to AJAX.