php - Initializing variables in plugin for use on Wordpress pages -


i created session plugin in wordpress send success/error messages after form submissions. looks this:

class mysession{   //do stuff... } $mysession = new mysession(); $ssuccess = $mysession->success(); $serror = $mysession->error(); 

i can use $mysession on actual wordpress pages other 2 variables don't initialized. have manually insert last 2 lines of code in page. idea why or i'm doing wrong?

change mysession = new mysession();

to

$mysession = new mysession(); 

then ->

$ssuccess = $mysession->success(); $serror = $mysession->error(); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -