Jump to content

HELP :(


Genesis730

Recommended Posts

I have my page setup something like this...

 

<?PHP
if($loggedin){
   echo "Welcome <b>$username</b>, you are logged in. <br><br>";
}
else{

$content = file_get_contents("loginform.php");
echo $content;
}
?>

 

i did this workaround because the login form displays "Username" and "password" if the initial value is null and without echoing the form as different page, the PHP has a lot of errors, code for the input looks something like this.

 

value="<?PHP if ($form->value("user")=="") echo "Username"; else echo $form->value("user"); ?>">

 

my question is can anybody advise a better way to approach this or fix the error because as it stands everything works except the echoed page displays the php code instead of executing it on the server.

 

Link to comment
https://forums.phpfreaks.com/topic/205972-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.