I have a hashtag script running that creates a link to another page on my social network. right now i have it set so that U = logged in user name and TAG = the hashtag being used. for some reason the variable $logged username isnt giving a result when the user is logged in or logged out. its just blank. below is the hashtag script i am running
<?php
///hashatg script
function convertHashtag($str){
$regex = "/#+([a-zA-Z0-9_]+)/";
$str = preg_replace($regex, '<a href="/hashtag.php?u='.$log_username.'&tag=#$1" title="all posts that include #$1">$0</a>', $str);
return($str);
}
$string = $statuslist;
$string = convertHashtag($string);
?>
below is the link that is produced, u should = logged user name, like: betty, frank, peter, etc.
http://website.com/hashtag.php?u=&tag=#myhashtag
should read
http://website.com/hashtag.php?u=betty&tag=#myhashtag