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. Quote Link to comment 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"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.