Thread: Login Box
View Single Post
  #2  
Old 11-05-2012, 12:13 PM
Hedgen's Avatar
Hedgen Hedgen is offline
Member
 
Join Date: Oct 2012
Posts: 36
Gender: Male
Credits: 4,866
Hedgen is on a distinguished road
Default

I figured it out. I just had to change $loginform to $article_content

So this:
Code:
$loginform = "<form name='form1' method='post' action='login.php'>
  <p>Username: 
     <input name='username' type='text' id='username'>
</p>
  <p>Password: 
    <input name='password' type='password' id='password'>
</p>
  <p>
    <input type='submit' name='Submit' value='Submit'>
  </p>
  <p>Don't have an account?<br>
  <a href='register.php'>Register Free</a>  </p>
  <a href='forgotpass.php'>Forgot your password?  Click Here</a>
</form>";
To this:
Code:
$article_content = "<form name='form1' method='post' action='login.php'>
  <p>Username: 
     <input name='username' type='text' id='username'>
</p>
  <p>Password: 
    <input name='password' type='password' id='password'>
</p>
  <p>
    <input type='submit' name='Submit' value='Submit'>
  </p>
  <p>Don't have an account?<br>
  <a href='register.php'>Register Free</a>  </p>
  <a href='forgotpass.php'>Forgot your password?  Click Here</a>
</form>";
Edit: How do I make it so it doesn't take you to "login.php" but it still logs you in? I kind of want to create a "visual novel" kind of feeling when the user isn't logged in, so it shows a person, few sentences later you pick login (or register) and I want to make it so if it's not a valid login information, the person says "It seems you either put the wrong username or password in, or we do not have an account for you. Please try again". Or if you put the right information in: "Welcome back." shows up, in the same window.

- Figured out the "Loading screen" thing -
__________________
I have some small tutorials Here that show things such as re-arranging the SIDEFEED and LINKSBAR, and redirecting people after login.

Last edited by Hedgen; 11-05-2012 at 06:42 PM.
Reply With Quote