Grab the RSS feed

Page redirection Using PHP

The simplest and easiest way is header redirection in PHP.

The Header redirection has the PHP following syntax.

void header ( string $string [, bool $replace = true [, int $http_response_code ]] )

Whenever you need to redirect the page you can use this.

Today I need to solve the issue that contains this problem.

My situation is when the user get the Message it will open in the Jquery Modal box with the button read and delete. When they get the popup and click the button it will redirect to the page with the url of ?MessageID=’something.’

Even if delete the message it will called in the ajax and the URL is NOT cleaned .Then after delete the ID also going to be cleared in Database. IF the user going to refresh after delete the message it gives the SQL error because of there is no such a ID.

In that situation I use the above header redirection. That is I check whether the ID is NULL. If it is NULL then I redirect to the another URL.

Otherwise I can do the Operation as Read a Message.

Leave the comments to improve ourself………….

For more Information visit this site

Click Here to download as a PDF format


    Real Time Web Analytics