Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default Error with script

    Yeah well.. Wrong section but no-one reads the coding section..

    This is the code for my changepass.php but its 4am and i really cant figure out the problem (Its probablly wayyyyy simple) And i only have like 5 mins on pc tomorrow and want to get it done..

    Just tell me what you think the error is

    Code:
    <?php
    include ("connect.php");
    $oldpass = htmlspecialchars ($_POST[oldpass]);
    $newpass = htmlspecialchars ($_POST[newpass]);
    $newpass2 = htmlspecialchars ($_POST[newpass2]);
    
    
    $checkpass = mysql_query("SELECT `password` from `usertable` where username= '$_SESSION['username']' and password='".$oldpass."'");
    $valid = mysql_fetch_array($checkpass);
    
    if($newpass != $newpass2) {
    die("The new passes dont match. Please try again");
    }
    
    $countrow = mysql_num_rows($checkpass); 
    if ($countrow ==1 ) {
    
    $update_data = mysql_query ("UPDATE `usertable` SET password='$password' WHERE 
    username=  $_SESSION['username']");
    
    echo ' Your pass has been changed';
    
    }
    else
    {
    echo 'There was an error`;
    }
    ?>
    <form name="passchange" method="post" action="<? echo $PHP_SELF; ?>">
    
    Old Password:<br/>
    <input type="password" name="oldpass" class="textbox"><br/><br/>
    New Password:<br/>
    <input type="password" name="newpass" class="textbox"><br/><br/>
    
    New Password <i>(Again)</i>:<br/>
    <input type="password" name="newpass2" class="textbox"><br/><br/>
    
    <input type="submit" value="Submit" class="login" name="submit">
    
    </form>
    Cheeerrs
    Last edited by Sam; 28-01-2007 at 04:36 AM.

  2. #2
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    And the error message is ''/

  3. #3
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by Tomm View Post
    And the error message is ''/
    Yes that would help lol.

  4. #4
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    There isnt an error =/ It just doesnt submit it. You should of remembered to tell them that Sam...


    You don't like me
    Chances are I don't like you.

  5. #5
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    Look at the time it was posted >.>

    Rofl..

    Umm i think i did say..

    The text just disappears when you hit submit and it doesnt update the database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •