Genesis730 Posted June 27, 2010 Share Posted June 27, 2010 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 More sharing options...
Genesis730 Posted June 27, 2010 Author Share Posted June 27, 2010 i suppose something like this would do the trick, huh?? haha im an idiot sometimes. include("inputform.php"); Link to comment https://forums.phpfreaks.com/topic/205972-help/#findComment-1077774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.