PHP Web Development Tutorials

PHP Web Development Tutorials and Articles
  Title / Author Replies
Views Reverse Sort Order
If you want to validate a form without submitting it, you can use two methods, one is pure client side JavaScript and the other being a mix of JavaScript and server-side scripting which can be PHP,ASP.JSP,Perl or anything for that matter. First I will give an example of pure JavaScript...
21
236,326
This is a very simple code and hardly requires any explanations. :eek: If you need any put the post here. functions.php <?php function createsessions($username,$password) { //Add additional member to Session array as per requirement session_register();
135
120,239
Introduction Suppose you want to know the age of a person given her birth date. Let’s say her birth date is "09-23-1969". Although in this case you might say that we don’t need a program to compute the age, but assuming there are 1000s of records in your database and for every person you have to...
0
65,063
Sometimes you just need to know what country your site visitors are coming from - for example, if you're trying to implement geo-targeted advertising. This article will show you how. Sometimes you just need to know what country your site visitors are coming from - for example, if you're trying...
23
62,978
I was wondering whether i could read the size of a directory using PHP. So i thought of making something which could help me read the size of the directory ,no. of directories and the no. of files in the given diretory. The function "getDirectorySize" will ignore link/shorcuts to files/directory....
9
53,917
Here's the code to read ID3 tage from a MP3 file <?php //Reads ID3v1 from a MP3 file and displays it $mp3 = "1.mp3"; //MP3 file to be read
10
47,075
Say if you want to generate graph on your website using data from a data base, you might be wondering how to go about it. Well the best way I would do it is use free PHP GD library. Here is a class i wrote to generate a graph in a PNG image for me. class BarGraph { var $barWidth; var...
5
41,640
PHP will automatically convert data types as necessary across the board - you need not worry about it happening. If you specifically wish to override PHP's type conversion, you can perform what is called a type cast - you forcibly convert a variable of type A to type B. In PHP, type casting looks...
3
39,151
There are many different traffic analysis tools, ranging from simple counters to complete traffic analyzers. Although there are some free ones, most of them come with a price tag. Why not do it yourself? With PHP, you can easily create a log file within minutes. In this article I will show you how!...
14
36,899
Ill start by giving the code to the guest book then I will give a step by step on what each part does. <?php if(isset($_POST) && isset($_POST)) { if($_POST != "" && $_POST != "") { $F_D = getdate(); $FT = $F_D."/".$F_D."/".$F_D;
0
35,881
All PHP coders are aware of the mail() function in PHP, which can be used to send mails. On Linux systems we ussually have Sendmail program installed, if someone is facing a problem sending mails with mail() function, they can alternatively use Sendmail to send mails. For sending mails using...
4
34,553
Many times it is required for us to calculate the time remaining and display it in a very understandable format like days,weeks,hours etc. Here is a function i wrote to do the same. //FUNCTION FOR TIME LEFT function time_left($integer) { $seconds=$integer; if...
2
32,384
File upload is very common requirement of many web sites. We may require to upload pictures online to websites. Image upload is very common requirement and many sites are using this to allow members or visitors to upload files. We will learn how to upload multiple files using a single form. This...
8
31,644
I am listing tips to improve your PHP code performance. There are few whom you can call as debatable but overall the code performance will surely increase. Following tips are written to save time and development cost (includes memory too) If a method can be static, declare it static. Speed...
18
29,054
Introduction XOR encryption is a trivially simple symmetric cipher which is used in many applications where security is not a defined requirement.Exclusive-OR encryption, while not a public-key system such as RSA, is almost unbreakable through brute force methods. It is susceptible to...
5
25,969
Introduction The RGB color model is an additive model in which red, green, and blue (often used in additive light models) are combined in various ways to reproduce other colors. The name of the model and the abbreviation ‘RGB’ come from the three primary colors, red, green, and blue and the...
3
24,443
I was wondering in how many ways can we iterate through an array in PHP. So, I figured out a few, here's it... Our Array, which we will be iterating on, $arr = array('PHP','Perl', 'JavaScript','AJAX', 'Python','ASP', 'C#'); 1. Using a simple for loop // using for loop ...
1
23,304
Introduction Roman numerals are a great way to add a bit of class to a web page. They are often used in official titles, such as the XXXIV Pennsic War (34th). The rules for Roman numerals are straightforward and therefore lend themselves to being scripted. The basic rules of Roman numerals...
2
21,424
A trend with a lot of new Web Designers is to blindly go for ASP or JSP for creating dynamic and interactive websites. Why use PHP for server-side scripting? This question comes in mind of a lot of Web Designers, especially in mind of designers/programmers who are only exposed to much hyped server...
14
21,023
Introduction PHP comes with an extensive catalog of date and time functions, all designed to let you easily retrieve temporal information, massage it into a format you require, and either use it in a calculation or display it to the user. However, if you'd like to do something more complicated,...
5
18,784