i have spent several hours searching about without success, please help me with following:
I have wp exec plugin installed in my fresh wordpress installation.
I can use regular php and mysql queries inside wordpress posts; now i need to use wordpress user session variables to send mysql queries from php scripts in wordpress post.
I mean queries like……. (“select * from table where id_user =’”.$_SESSION[‘ID’].”‘”);
thanks a lot
Diego Jimenez
Use this standard function to get the user ID and the rest should work:
See definition