Passing php variables


Notice: Undefined variable: params in /home/rogerlov/public_html/blog/skins/print/index.main.php on line 63

Warning: array_merge(): Expected parameter 2 to be an array, null given in /home/rogerlov/public_html/blog/skins/print/index.main.php on line 63

Notice: Trying to access array offset on value of type null in /home/rogerlov/public_html/blog/skins/print/index.main.php on line 70

Notice: Trying to access array offset on value of type null in /home/rogerlov/public_html/blog/skins/print/index.main.php on line 80

Notice: Trying to access array offset on value of type null in /home/rogerlov/public_html/blog/skins/print/index.main.php on line 85

Notice: Trying to access array offset on value of type null in /home/rogerlov/public_html/blog/skins/print/index.main.php on line 91

Notice: Trying to access array offset on value of type null in /home/rogerlov/public_html/blog/skins/print/index.main.php on line 93

In making a widget to show the current user's posts, I had to get the php $current_User->.
This was achieved by
1. adding code to the header so that it was global and could be called from anywhere.

<script>
var uid = "<?php echo $current_User->ID; ?>";
</script>

2) then a FreeHTML widget called the javascript variable: javascript being usable in the FreeHTML widget

<script>
url="https://calstock.org.uk/?disp=useritems&user_ID=" + uid;
document.write("<a href=" + url + ">My Posts :: <em>All collections/a>");
</script>