Archive for the 'PHP' Category

How to place a contact form on your website?

I always being asked on how to create a contact form for website where visitor can write message on an online form and the data then be sent to the website owner’s email.
Long time ago I used free service from freedback.com when I remembered during that time it was very hard to learn CGI using [...]

How to secure your PHP code on server

Long time ago, I’ve been searching for ways to secure my PHP code on hosting server or code installed on client’s server. As like compiled language such as C++ or VB, you can easily compile it as executable file (.exe) and you do not have to hand in your source code.
As for PHP, you can [...]

Common PHP error messages

Debugging your code may take your time. So it is quite a good idea if you can list down common errors so that you can overcome it faster the next time you find it.
Below are some common errors that I always found when running a PHP programming. Will add more later.
Parse error: parse error, [...]

FFA classifieds website project

I’m now in progress of developing free for all classifieds website that will
- make it very easy to post ad. No registration required
- easily to search by keyword
- has search engine friendly feature
- ready to serve outside Malaysia market in the future
Target to launch end of this week (Feb 27, 2006). And will get lots [...]

How to generate random number in PHP?

Sometimes we need to have a random quote, news, testimonials being displayed on the front page of a website. We can use random number function to get a random id of a data to be generated.
The code is as below
——
$maxnum = 10;
srand(time());
$random_num = (rand()%$maxnum);
echo “The random number is: ” . $random_num;