Scroll to top

How to use PHP session in wordpress?


Notice: Undefined variable: string in /home/u665484253/domains/wpcodekit.com/public_html/wp-content/themes/twentytwenty-child/functions.php on line 61

Use PHP session in wordpress.

add_action('init', 'myStartSession', 1);
function myStartSession() {
if(!session_id()) {
session_start();
}
}

 

Get more information

Read More Posts

Leave a Reply

Your email address will not be published.