SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Unable to jump

  1. #1
    SitePoint Zealot doca's Avatar
    Join Date
    Dec 2004
    Location
    Vienna, AT
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unable to jump

    Hi Guys
    I get an error when i use this passwort forgotten script !!!

    Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 9 in /var/www/html/lostpass.php on line 60

    Why

    PHP Code:
    }else{
            if(
    $forgotten=='')
            {
                    echo
    "<a href=\"javascript:history.back();\"$errorem_reminder</a>";
            }
            else
            {
                     
    $sql "SELECT password FROM ".$tableusers." WHERE email='".$forgotten."';";
                     
    $result mysql_query($sql) or die($sql);
                     
    $password mysql_result($result,0,"password");
                     
    $num_rows mysql_num_rows($result);
                if(
    $num_rows >= 1)
                {
                    
    $subject $lostpass_reminder;
                    
    $message $message_reminder $password."\n\n".$thtitle."\n\n".$thurl."\n\n";
                    
    mail($forgotten$subject$message"From: \"$from_reminder\" <$row[1]>\nX-Mailer: PHP/" phpversion());
                    echo
    "$emailed_reminder";
                }
                else
                {
                     echo
    "<a href=\"javascript:history.back();\"$notfound_reminder</a>";
                }
            }


  2. #2
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Move this line

    mysql_result($result,0,"password");

    to if($num_rows >= 1) block.

  3. #3
    SitePoint Zealot doca's Avatar
    Join Date
    Dec 2004
    Location
    Vienna, AT
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    THANKSSS


Bookmarks

Posting Permissions

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