Sabtu, 26 Desember 2009

The new version 3.0.4 of PHP AdminPanel Pro was released.



The new version 3.0.4 of PHP AdminPanel Pro is available now for downloading. There are many bugs fixed and also Many NEW additions and improvements. This version requires full re-installation, if you work with one of previous. All recent changes can be viewed here.

Check here our Tour and Screenshots!

And new DataGrid Pages Wizard Online DEMO

The Features:
• One-Year FREE Updates

Jumat, 18 Desember 2009

How to Get value stored in Cookie in php ?

Now you have learnt to set a cookie in php. Now the next thing is to retrieve the value stored in cookie.

With the following code you can retrieve the value stored in cookie.
To get the value stored in cookie we are using global variable $_COOKIE.

Here we are getting the value stored in cookie to the variable $mycookie.


Here is full code to check & print the value of the cookie.

Kamis, 17 Desember 2009

Error while creating a cookie - Warning: Cannot modify header information...

Hi,
Are you getting this kind of error when creating a cookie or setting a cookie -

Warning: Cannot modify header information - headers already sent by (output started at e:\wamp\www\mysite\test.php:3) in e:\wamp\www\mysite\test.php on line 4

This error comes when some data is sent to the browser before setting the cookie.
So setcookie or setrawcookie function should be the first to be called means,

setcookie or setrawcookie function should be the first line on your page.


So if you use code like this








so the above code will give error.

So you should do following thing.





How to Set a Raw Cookie in php ?

You might be searching for how to set a raw cookie in php. So here is a simple example which shows how to set a raw cookie.

To set a cookie use the function "setrawcookie"

setrawcookie() is exactly the same as setcookie() except that the cookie value will not be automatically urlencoded when sent to the browser.

This function accepts different number of arguments or parameters as setcookie. You can see the php reference manual of setcookie function here for more details.

In the following example we are passing 3 parameters
1) cookie name - its the name by which cookie will be identified.
2) cookie value - its the value stored in cookie.
3) expiration time - the time till the cookie will be available, after that it will be destroyed.



You can set the cookie by using above function.
more details can be found here.

How to Set a urlencoded Cookie in PHP ?

You might be searching for how to set a cookie in php. So here is a simple example which shows how to set a cookie.

To set a cookie use the function "setcookie"

Note that the value portion of the cookie will automatically be urlencoded when you send the cookie, and when it is received, it is automatically decoded and assigned to a variable by the same name as the cookie name.

This function accepts different number of arguments or parameters. You can see the php reference manual of setcookie function here for more details.

In the following example we are passing 3 parameters
1) cookie name - its the name by which cookie will be identified.
2) cookie value - its the value stored in cookie.
3) expiration time - the time till the cookie will be available, after that it will be destroyed.



You can set the cookie by using above function.
more details can be found here for more details.

Selasa, 15 Desember 2009

List files of a Directory in php or List files of a folder from php code

Hi,
You might require this code which lists all files from a specific directory in php. It shows the files from a folder you want.
Even you can specify which files to ignore eg. when showing image you dont want to show thumbs.db file, so you can specify in the code neglect thumbs.db file.
So your code will show all files except thumbs.db 

This is a very basic program, you can extend it to a level you want as per your requirement. If you need some help ask me, if possible definitely i will help.


In the below code there is one array $exclude, in this array you specify the files which you want to ignore in your final output, so it will not be shown. And just modify the if loop.





If you know any other way to do the same then comments are always welcome.
Dont forget to tell your friends about http://programming-in-php.blogspot.com

Minggu, 13 Desember 2009

New version 3.0.2 of PHP MicroCMS Pro released

PHP MicroCMS allows users with very little technical knowledge to build websites, as done by millions of bloggers on the web. PHP MicroCMS requires NO knowledge of HTML, although HTML can be used to enhance the pages by adding headings, images, hyperlinks or simply to emphasize text. The new version 3.0.2 of PHP MicroCMS Pro is available for downloading. There are many changes and additions in

Sabtu, 05 Desember 2009

New version 6.0.5 of PHP DataGrid

The new version 6.0.5 of PHP DataGrid is available now for downloading. There are many bugs fixed and also some important improvements, like using [CANCEL] and [UPDATE] in customized layout, drawing floating tooltips with single quotation mark etc. This version requires full re-installation, if you work with one of previous. Read carefully Getting Started. Here the main additions and