No good.  :-(

Miguel Cruz wrote:

>Okay, I'm pretty sure your problem is this:
>
>All those variables referenced in $footertext ($REMOTE_ADDR, $userinfo, 
>etc.) need to be brought into the local context in the function calling 
>eval(), using the global keyword. Otherwise they won't be available.
>
>miguel
>
>On Mon, 20 May 2002, Leif K-Brooks wrote:
>
>>Ok, I guess I'll send it.  Thanks for trying to help.  Here it is:
>>
>>    $ip = $REMOTE_ADDR;
>>    $query = mysql_query("select COUNT(*) as rowexists from ips where ip
>>    = '$ip'");
>>    $result = mysql_fetch_array($query);
>>    if(($result['rowexists'] == 0) && ($loggedin)){
>>    mysql_query("INSERT INTO `ips` (ip,username) VALUES
>>    ('$ip','$userinfo[username]')") or print "Error: ".mysql_error();
>>    }
>>    $time_end = getmicrotime();
>>    $time_taken = $time_end - $time_start;
>>    $query = mysql_query("select COUNT(*) as cnt from ips");
>>    $result = mysql_fetch_array($query);
>>    $visits = $result['cnt'] + 2800;
>>    eval($getlayout['footer']);
>>
>>
>>Miguel Cruz wrote:
>>
>>>Rather than continuing to shroud this in mystery, could you at least give 
>>>us a taste of what is in $footertext? 
>>>
>
>

Reply via email to