PHP htmlentities() function ..

$user_name = htmlentities($_POST[‘user_name’]);


$user_name = $_POST[‘user_name’];

which one secure ?

15th Oct 2010 at 10:36 PM   1066 Views  3 Comments

How to use tinymce with html forms

We all know tinymce is a platform independent web based Javascript HTML WYSIWYG editor.  It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

I’ve used tinymce in many of my projects. I like it a lot because of it’s easy to use & rich functionality. But, despite of it’s simplicity many peoples i’ve seen, struggled to intigrate it with their forms. I don’t know why but, i’ve never face any such problem in my works.

So, in this small tutorial i’m going to share step by step how you can intigrate tinymce iwth your own web developemnt work.

Download latest version of tinymce from the following download link & extract it.
Download link:

On Windows you could use WinZip or something similar, and on other operating systems such as Linux you simply extract the archive with the tar command. You can find an example on how to extract the archived file on Linux below. You should extract TinyMCE in your wwwroot or site domain root folder.

After extracting your tinymce folder structure will look like this…

TinyMCE folder structure

After extraction of the tinymce files you just need to do some modification with the web form page where you want to use tinymce.

[1] Include a external js file
[2] Add some javascript codes in the headder section

The codes will look like this…

tinymce js file

Get the above javascript codes from here:

Note: This is very necessary to use approprite "tiny_mce.js" file path. This is very much important else, nothing will work.

In the reciving side(PHP form action page) the data can be accessed by following way…

//content is the textarea element name

That’s it. Nothing more than this need to do. This will change your textarea to like this…

tinymce textarea output

For more info:

16th Oct 2010 at 12:07 PM   4687 Views  0 Comments

problems with php POST

hello, i?m new and i don?t understand a lot of this cms.
i have an issue whit my script: it alert me the input is null when they aren?t. so if you click register and you have completed all input it will alert you that you haven?t complete all box. can anyone help me , possibility for free ?

6th Sep 2010 at 3:14 PM   2369 Views  17 Comments

10 PHP and MySQL development tutorials

Why you Should be using PHP?s PDO for Database Access

This is an article about PHP’s PDO. PDO stand for "PHP data objects". Many PHP programmers learned how to access databases by using either the mysql or mysqli extensions. Since PHP 5.1, there?s been a better way. PHP Data Objects. PDO provide methods for prepared statements and working with objects that will make you far more productive!...

Read more:

How to Create a Forum in PHP from Scratch
This is a tutorial for creating a small forum script by having minim features, using PHP & MySQL. Whole script has been made by OOP’s methode. All the codes preety clean,nice & well organized.

Read more and download codes:

How to connect your site with twitter using @Anywhere
How to connect your site with twitter using @Anywhere

Twitter has launched @Anywhere, a more simple way of integrating twitter in your site. With it you can add follow buttons, hovercards, linkify twitter usernames and connect with twitter.  In this tutorial, Irina Borozan has shown you how to use @Anywhere in your site.

Read more and download codes:
IMP note: Twitter no longer support basic authentication. In place of this they are now supporting OAuth. Get more info about this from here..

Facebook Style Tag Friends with Jquery, Ajax and PHP
Facebook Style Tag Friends with Jquery, Ajax and PHP

This is a really nice tutorial about how to make a "facebook like tag friends in your status or update box" by Srinivas Tamada. This has been build by using Ajax, PHP & JQuery.

Read more and download codes:

Creating a Upload/Download System Using PHP Classes
This is file uploading and downloading script by Cody Robertson. The script is able to upload files with certain file extensions and set a limit to the size of the file which you want to upload. This will all go along with a sharing link and a force download script.

Read more and download codes:

9 Useful PHP Functions and Features You Need to Know
Here is an article about 9 useful PHP functions by Burak Guzel for PHP developers. These are like…

* Functions with Arbitrary Number of Arguments
* Using Glob() to Find Files
* Memory Usage Information

Read more and download codes:

Creating a Web Poll with PHP
Creating a Web Poll with PHP

This is polling script which has made by PHP from tutsPlus network. Whole script has made by using OOP’s & described in full details. Truely a full script which any one can use in their web development work without giving a lot of pain to their brain.

Read more and download codes:

PHP Variables: The Ultimate Guide
PHP Variables: The Ultimate Guide

Variables are important in every programming language ? and it?s no different in PHP. Variables give developers the possibility of temporarily storing data to be used in PHP scripts (in PHP?s case, this happens in the server?s memory). This guide by Elias Zerrouq, is all about working with variables in PHP.

Read more:

Digg Style Follow Unfollow Application Using jQuery and PHP
Digg Style Follow Unfollow Application Using jQuery and PHP

We all know about Digg’s new layout design. I’m really impress a lot about it. If you use digg you might have seen that follow profiles features. This tutorial by Zeeshan Rasool, is exactly about that. He has made this by using PHP & JQuery.

Read more and download codes:

Quick Tip: Working with MySQL and SUM
This is a quick tip video about how to using SUM() and IF() functions to make some useful queries.


24th Sep 2010 at 3:06 PM   6788 Views  2 Comments

Synchronize your twitter account by using PHP and Twitter API

Hey Guys…..
Today got a PHP script by which you can update your twitter account by using PHP and Twitter API. This is thing can be really useful when any body want to synchronise their application info with their twitter account. This is a very simple script & very easy to understand. You don’t need to be API expert for trying this.

Personally , yet not used this but very soon i’m going to use it. If any body has already used this it’ll be really more informative us if you share your experience at here…..

More info:

20th May 2010 at 7:08 PM   1116 Views  2 Comments

Save current date and time in Mysql .......

$sDate = date("Y-m-d H:i:s");


$sql="INSERT INTO comment(name,email,year,location,date_time,comment) VALUES (’$name’,’$email’,’$year’,’$location’,’$sDate’,’$comment’)";


when i fetch from database my date and time echo this: 2010-08-10 19:17:43

but i need this format : 10 August 2010 19:17:43 GMT ........

please help me….......

10th Aug 2010 at 12:21 PM   1200 Views  2 Comments

Mysql Query

How can i delete different table value using a single query ?

25th Jul 2010 at 12:23 AM   1008 Views  5 Comments

Problem in sending mail.

10th Jul 2010 at 6:10 PM   988 Views  0 Comments

Forum Post E Mail

I’m trying to create a code that upon a member posting to a forum that someone else has already started will send a notification e mail to everyone involved with the forum except for the person that just made the post.
The script needs to limit the e mails to once per user incase they have previously posted to that forum many times so they won’t receive multiple e mails at once.
Below is a sample script that gets me to the point where I now need to use something like a foreach or while and input the e mail information. It works great but once I put either a while or foreach on it the script either has errors or will run forever. Any help would be great!

$get_users = “SELECT created_by FROM forumPosts WHERE topic_id=’$topic_id’ AND created_by!=’$name’”;
$run_get_users = mysql_query(”$get_users”);
$get_all_users = mysql_fetch_assoc($run_get_users);
$filtered = array_unique($get_all_users);

24th Jun 2010 at 12:20 PM   1152 Views  0 Comments

ThePhig, an Open Source PHP image Gallery

ThePhig is an OpenSource php script created around the basis that creating an album of images should be as easy as uploading a directory of images.  It requires PHP5.2+, GD Library and MySQL database.

ThePhig Open source PHP image gallery

ThePhig supports the following features to help achieve this.

* Automatic thumbnail creation of images
* Easily customizable with CSS
* OpenSource allows for the modification of the underlying code if needed
* A password protected administration panel for modifying many of the settings of the gallery (such as name of the gallery, image titles, etc)
* The ability to create an album icon directly from the administration panel
* If coorinates exist in the exif data, the ability to have the images in an album mapped out for you
* Easy to implement into an existing website
* Currently supporting three different image overlays: PrettyPhoto, FancyBox, and Shutter Reloaded

View the Demo:

Developed by Ryan Reed; ThePhig is available for download under GNU General Public License.. 
More info & Download:

28th May 2010 at 8:29 PM   1449 Views  0 Comments