Paging Results With PHP and MYSQL - Part 1

This item was filled under [ PHP ]

Lets say you got a site that prints out some result based on a search or lists some items and it has hundreds of rows. Therefore, you end up having a lengthy list, which is hard to read. If your list contains images, hundreds of images get loaded on a single page. This is not appealing. I’m going to show you a way of dividing results into several pages and allow users to navigate through there results.

For this example, I am using mysql database called temp and a table called links.

The following code is the SQL statements i ran to generate a sample database for this example. Database name is called ‘temp’ and it has one table called ‘links’ (see SQL statements bellow). Then I have added some data to that table.

Continue reading…

Tagged with: [ , , ]

File Upload with PHP

This item was filled under [ PHP ]

I’m going to show you how you can allow users to upload file into your web server. I’m just covering the basics here. Though I’m not concerning security related issues here, there is a big risk in allowing users to upload files.
The first reason is that people can upload scripts into you server and execute them there. The second easiest thing to do is write a script that upload hundreds of thousands of files into your server, eventually making it run out of disk space. Hopefully in the future I’m going to write some security articles as well.
Continue reading…

Tagged with: [ , , ]

How to insall MPlayer from Source

This item was filled under [ GNU/Linux ]

I have seen many people struggling to get the MPlayer working in GNU/Linux and the following is a simplified guide for these people, it worked for me. Follow this method in any disto, it should work, unless of course if you don’t have the basic resources like make, gcc and etc.

Before you install MPlayer, it asks for either DivX or XVid codec (not sure if they are available in you distro) else fetch it from http://www.xvid.org/ and http://download.divx.com/labs/ divx611-20060201-gcc4.0.1.tar.gz. Just install them both so you can use both of them. First install these two, so mplayer can support these codecs as well. It’s not a big deal to install these codecs.
Continue reading…

Tagged with: [ , , , ]
 Page 4 of 4 « 1  2  3  4