adsense

How to Use Sessions With WordPress





1. Open a Web browser and log into the WordPress dashboard using your user name and password.
2. Click the Appearance left panel link. Click Editor to open the editor. Click the header.php page to open the code for the main header file. The header file is the typical location for session variables, but you can use any file in your WordPress app.

3. Add the following code to the editor:session_start()
$_SESSION['myid'] = 'value';Replace 'myid' with the name of your session and replace 'value' with the value you want to store in the session variable.
4. Click 'Update' in the editor window to save the changes to your blog page. The changes take effect immediately.

Comments

0 Responses to "How to Use Sessions With WordPress"

Post a Comment

Popular Posts

About