+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: working with a PHP login system script...

  1. #11
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: working with a PHP login system script...

    You're fine with what you have, you just need to make a little change:

    Code:
    <input type="text" name="username" <!-- this is wrong, this is your own code -->
    <input type="text" name="user" <!-- this is right, this is what is in main.php -->
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  2. #12
    rufussweetwater's Avatar
    rufussweetwater is offline x10Hosting Member rufussweetwater is an unknown quantity at this point
    Join Date
    May 2009
    Location
    IN, USA
    Posts
    56

    Exclamation Re: working with a PHP login system script...

    okay i fixed that, but now what? I am trying to link the main.php file but I end up getting a bunch of visible code on the WYSIWYG design board. also I changed the login button to link it but I lost my picture and now I just have a brown box with the word 'login' and no picture or CSS is kicking in. heres the code i worked on:

    Code:
    <!--Login Area Starts -->
    			<div id="login-area">
    				<form action="process.php" method="post" name="Login" id="Login">
    					<label>Members Login:</label>
    					<div align="center">
    					  <input name="user" type="text" id="user" value="<? echo $form->value("user"); ?>" maxlength="32" />
    					  <? echo $form->error("user"); ?>
    					  <input name="pass" type="password" id="pass" value="<? echo $form->value("pass"); ?>" maxlength="32" />
    					  <? echo $form->error("pass"); ?>
    					  <input type="submit" src="http://forums.x10hosting.com/images/login-btn.gif" value="Login"  class="login-btn" alt="Login" title="Login" />
    					  <br class="spacer" />
    				  <span class="style1"><span class="style2"><?
    /**
     * User has already logged in, so display relavent links, including
     * a link to the admin center if the user is an administrator.
     */
    if($session->logged_in){
       echo "<h1>Logged In</h1>";
       echo "Welcome <b>$session->username</b> <br><br>"
           ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] &nbsp;&nbsp;"
           ."[<a href=\"useredit.php\">Edit Account</a>] &nbsp;&nbsp;";
       if($session->isAdmin()){
          echo "[<a href=\"admin/admin.php\">Admin Center</a>] &nbsp;&nbsp;";
       }
       echo "[<a href=\"process.php\">Logout</a>]";
    }
    else{
    ?></span><?
    /**
     * User not logged in, display the login form.
     * If user has already tried to login, but errors were
     * found, display the total number of errors.
     * If errors occurred, they will be displayed.
     */
    if($form->num_errors > 0){
       echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
    }
    ?> | Remember Me | <a href="forgotpass.php">Forgot Password?</a></span></div>
    			  </form>
    			</div>
    			<!--Login Area Ends -->
    also when i hit login it just opens up main.php in text form on my web browser and does nothing, along with all my other buttons...
    Last edited by rufussweetwater; 07-01-2009 at 08:04 AM. Reason: spellcheck...

    :hahano: Don't Laugh, I'm not a hard gamer... :hahano:

    ................I Know................
    :wavey: $====> CYK Studios <====$ :lockd:
    Movies, Games, Reviews, & More...

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. How to: Member Login System with PHP
    By tttony in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 02-12-2009, 04:51 PM
  2. php login script
    By matt1213 in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 12-03-2008, 08:31 AM
  3. Login script 1k credits
    By Daniel S in forum The Marketplace
    Replies: 7
    Last Post: 08-22-2008, 03:10 PM
  4. PHP script not working (RSSgenr8.php)
    By deepwater in forum Free Hosting
    Replies: 8
    Last Post: 09-13-2007, 11:14 PM
  5. PHP login script
    By xunhandmex in forum Scripts & 3rd Party Apps
    Replies: 8
    Last Post: 05-26-2005, 07:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers