Skip to content
Skip to search - Accesskey = s
parentNode.org
The building blocks of a solid frontend.
Pasted
by
miro
on
2007-12-27 00:05
as
PHP
Create New
http://pastebin.parentnode.org/
Links this one
http://pastebin.parentnode.org/29362
Comment
$cookie_hash_user_name is empty after declaring it as global
function is_logged_in() { $a = 1; $b = 1; //returns a string (username) $name_korrekt = mysql_query("SELECT name FROM away_user WHERE login_cookie='".mysql_real_escape_string($hash_pruefen)."'"); if($a) == $b) { $cookie_hash_user_name = mysql_result($name_korrekt, 0); print "1: ".$cookie_hash_user_name"; global $cookie_hash_user_name; //why is $cookie_hash_user_name now empty? print "2: ".$cookie_hash_user_name"; } }