I am working on this mecasnism. My question is this: How can I add a php include into the $isOwner = ''; Is this possible? it will accept divs but not includes.


// Check to see if the viewer is the account owner
$isOwner = '';

if($u == $log_username && $user_ok == true){
	$isOwner = '';
	include_once("loggedinuser.php");
	$profile_pic_btn = '<a href="#" onclick="return false;" onmousedown="toggleElement(\'avatar_form\')">Toggle Avatar Form</a>';
	$avatar_form  = '<form id="avatar_form" enctype="multipart/form-data" method="post" action="php_parsers/photo_system.php">';
	$avatar_form .=   '<h4>Change your avatar</h4>';
	$avatar_form .=   '<input type="file" name="avatar" required>';
	$avatar_form .=   '<p><input type="submit" value="Upload"></p>';
	$avatar_form .= '</form>';
}

    Not sure I follow. If you're asking how to get some value that is created/set in loggedinuser.php, then that is totally dependent on what that script does, and whether or not it actually returns anything, or sets a variable you can use, or defines a function you can use, etc.

      [man]file_get_contents/man?

      The always evil [man]eval/man?

      Create a function that returns whatever you want $isOwner to be, and call it?

        Write a Reply...