Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Sep 2008
    Posts
    697
    Thanks
    8
    Thanked 17 Times in 16 Posts

    Page gets cut off

    Hello, I currently have this page:

    http://rune-host.info/accounts-forgot2.php

    When you load it, its a fan site, the page is for a forgotten password script and you will see a form.

    Type in any email address in the correct (ex: your@site.com) format and you will see that the page gets cut off once you submit.

    You will notice the footer of the page is cut off.

    Pictures if you don't want to load the page:

    Front page. loads perfectly.


    ERROR PAGE: see the missing footer:


    ---

    SOURCE:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="en, English">
    <meta name="keywords" content="Runescape, Jagex, free, games, online, multiplayer, magic, spells, java, MMORPG, MPORPG, gaming">
    <meta name="description" content="RuneScape is a massive 3d multiplayer adventure, with monsters to kill, quests to complete, and treasure to win. You control your own character who will improve and become more powerful the more you play.">
    <title>RuneScape - the massive online adventure game by Jagex Games Studio</title>
    <style type="text/css">/*\*/@import url(css/global-17.css);/**/</style>
    
    <script type="text/javascript">
    function getPages(loc) {
      if (loc=="top") {
        var item=document.myformtop;
        var toupdate=document.myformbottom;
      }
      else {
        var item=document.myformbottom;
        var toupdate=document.myformtop;
      }
      var pagetoget=parseInt(item.page.value);
      var numpages=parseInt(item.numpages.value);
      if (pagetoget<=numpages) item.submit();
      else {
        try {
         item.page.value=item.currentpage.value;
         toupdate.page.value=item.currentpage.value;
        }catch(err){}
     }
    }
    </script>
    <style type="text/css">/*\*/@import url(css/news-2.css);/**/</style>
    
    </head>
    
    <body id="nav">
    <a name="top"></a>
    
    
    <div id="scroll">
    
    <div id="head"><div id="headBg">
    <div id="headOrangeTop"></div>
    <img src="img/main/layout/head_image_mob.jpg" alt="RuneScape">
    <div id="headImage"><a href="title.php" id="logo_select"></a>
    
    <div id="lang">
    
    <a href="" title="English"><img src="img/main/layout/union_flag.png" alt="English"></a>
    
    <a href="#" title="Deutsch"><img src="img/main/layout/german_flag.png" alt="Deutsch"></a>
    <a href="#" title="Fran&ccedil;ais"><img src="img/main/layout/french_flag.png" alt="Fran&ccedil;ais"></a>
    <a href="#" title="Portugu&ecirc;s (BR)"><img src="img/main/layout/brazilian_flag.png" alt="Portugu&ecirc;s (BR)"></a>
    </div>
    
    <div id="sessionText">
    You are logged in as <span id="accountName">
    
    l8er
    </span>
    </div>
    
    
    
    </div>
    
    
    <div id="headOrangeBottom"></div>
    
    <div class="navigation">
    <div class="location">
    
    <b>Location: </b> <a href="accounts.php">Home</a> &gt; <a href="accounts-settings.php">Settings</a> &gt; Forgotten Password
    
    
    </div>
    
    </div>
    </div></div>
    <div id="content">
    <div id="article">
    <div class="sectionHeader">
    <div class="left">
    
    <div class="right">
    
    <div class="plaque">
    Forgotten Password
    </div>
    </div>
    </div>
    </div>
    <div class="section">
    
    <div class="article">
    
    <div class="topshadow">
    <div class="bottombordershad">
    <div class="leftshadow">
    <div class="rightshadow">
    <div class="leftcorner">
    <div class="rightcorner">
    <div class="bottomleftshad">
    <div class="bottomrightshad">
    
    <div class="pagepad">
    <div class="centre" id="newsitemMenu">
    
    <script type="text/javascript" language="Javascript">
    <!--
    //Simple Switch Image Bucket Inc.
    //Made By Bucket
    
    if (document.images) {
         button1 = new Image
         button2 = new Image
    
         button1.src = 'img/logout_off.gif'
         button2.src = 'img/logout_on.gif'
     }
    if (document.images) {
         button3 = new Image
         button4 = new Image
    
         button3.src = 'img/btl_off.gif'
         button4.src = 'img/btl_on.gif'
     }
    //-->
    </script>
    <img src="img/spacer.gif" alt="This is spacer.gif" height="37">
    <hr>
    
    
    </div>
    
    <div class="newsJustify">
    
    
    
    <?php
    
    // This is displayed if all the fields are not filled in
    $empty_fields_message = "<p>Please go back and complete all the fields in the form.</p>Click <a class=\"two\" href=\"javascript:history.go(-1)\">here</a> to go back";
    // Convert to simple variables  
    $email_address = $_POST['email_address'];
    if (!isset($_POST['email_address'])) {
    ?>
    
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> 
    
    <span style="float: left;">
    Email Address:
    </span>
    <span style="float: right;">
    <input size="40" class="only" style="border:solid 1px #675f39; padding:4px 2px; font-size:12px;" type="text" name="email_address">
    </span>
    <br><br>
    <hr>
    <center>
    
    <input id="submit" class="submit-button" type="submit" value="Reset Password" >
    </center>
    
    </form>
    
    
    
    <?php
    }
    elseif (empty($email_address))
      {
        echo $empty_fields_message;
      }
    else 
    {
    require_once("inc/config.php");
    $email_address = mysql_real_escape_string($email_address);
    $status = "OK";
    $msg="";
    //error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR);
    if (!stristr($email_address,"@") OR !stristr($email_address,"."))
    {
    $msg="<p>Your email address is not in the correct format.</p>Click <a class=\"two\" href=\"javascript:history.go(-1)\">here</a> to go back"; 
    $status= "NOTOK";
    }
    if($status=="OK")
    { 
    $query = "SELECT email, username FROM admin WHERE admin.email = '$email_address'";
    $st = mysql_query($query);
    $recs = mysql_num_rows($st);
    $row = mysql_fetch_object($st);
    $em = $row->email_address;// email is stored to a variable
    
    
    
     if ($recs == 0)
    {  
    echo "<p>Sorry your address is not there in our database. Please try again.</p>Click <a class=\"two\" href=\"javascript:history.go(-1)\">here</a> to go back"; exit;
    }
    
    
    
    function makeRandomPassword() 
    { 
              $salt = "abchefghjkmnpqrstuvwxyz0123456789"; 
              srand((double)microtime()*1000000);  
              $i = 0; 
              while ($i <= 7) 
              { 
                    $num = rand() % 33; 
                    $tmp = substr($salt, $num, 1); 
                    $pass = $pass . $tmp; 
                    $i++; 
              } 
              return $pass; 
        } 
        $random_password = makeRandomPassword(); 
        $db_password = md5($random_password); 
         
        $sql = mysql_query("UPDATE admin SET password='$db_password' WHERE email='$email_address'"); 
         
        $subject = "Your New Password"; 
        $message = "Hello, you have chosen to reset your password. 
         
        New Password: $random_password 
         
        http://www.yoursite.com/login
        Once logged in you can change your password 
         
        Thanks! 
        Site admin 
         
        This is an automated response, please do not reply!"; 
         
        mail($email_address, $subject, $message, "From: yoursite.com Webmaster<admin@jyoursite.com>\n 
            X-Mailer: PHP/" . phpversion()); 
    echo "<p>Your new password has been send! Please check your email!</p>";
     } 
     else 
     {
     echo $msg;
     }
    }
    ?>
    
    
    
    <hr>
    
    </div>
    <div class="clear"></div>
    </div>
    </div>
    
    </div>
    </div>
    </div>
    
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    
    </div>
    </div>
    
    <div id="footer">
    <div class="contain">
    <div class="footerdesc">
    
    This website and its contents are copyright 1999 - 2009 Bucket Ltd<br>
    
    Use of this website is subject to our <a href="terms/terms.ws">Terms &amp; Conditions</a> and <a href="privacy/privacy.ws">Privacy Policy</a>.
    
    </div>
    <a class="jagex.com" href="http://www.jagex.com" target="_blank">
    
    <img src="img/main/layout/jagex2.png?5">
    
    </a>
    </div>
    </div>
    
    </div>
    
    </body>
    </html>
    MY MSN: Sith717@Hotmail.com
    PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
    PM me anytime for HTML, PHP or web design help. I will be glad to help you out.

  • #2
    Regular Coder
    Join Date
    Jan 2006
    Posts
    568
    Thanks
    6
    Thanked 84 Times in 84 Posts
    I can't see anything wrong in IE/FF/OP.

  • #3
    Regular Coder
    Join Date
    Sep 2008
    Posts
    697
    Thanks
    8
    Thanked 17 Times in 16 Posts
    So it works??

    Pictures?
    MY MSN: Sith717@Hotmail.com
    PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
    PM me anytime for HTML, PHP or web design help. I will be glad to help you out.

  • #4
    Regular Coder
    Join Date
    Jan 2006
    Posts
    568
    Thanks
    6
    Thanked 84 Times in 84 Posts
    This is what I get in all three browsers.

    Sorry I understand what you mean now, it only happens when an e-mail is entered. That is odd.

    Edit again -

    Code:
    echo "<p>Sorry your address is not there in our database. Please try again.
    </p>Click <a class=\"two\" href=\"javascript:history.go(-1)\">here</a> to go back"; exit; //what is this?
    Attached Thumbnails Attached Thumbnails Page gets cut off-screenshot.jpg  
    Last edited by gusblake; 12-07-2009 at 12:21 AM.

  • #5
    Regular Coder
    Join Date
    Sep 2008
    Posts
    697
    Thanks
    8
    Thanked 17 Times in 16 Posts
    No, use a fake email. not load it blank.

    Use a example email like: my@site.com

    And you will see the problem.
    MY MSN: Sith717@Hotmail.com
    PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
    PM me anytime for HTML, PHP or web design help. I will be glad to help you out.

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    No bucket,
    no footer when you hit the reset password button.
    /accounts-forgot2.php has no footer at all when it's used as the results page. php just ends after the "Click here to go back" link.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #7
    Regular Coder
    Join Date
    Sep 2008
    Posts
    697
    Thanks
    8
    Thanked 17 Times in 16 Posts
    I know, my php coding is messing it up, but I am unable to fix it, have any idea why?
    MY MSN: Sith717@Hotmail.com
    PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
    PM me anytime for HTML, PHP or web design help. I will be glad to help you out.

  • #8
    Regular Coder
    Join Date
    Jan 2006
    Posts
    568
    Thanks
    6
    Thanked 84 Times in 84 Posts
    bucket seems to have solved it now anyway. Did you remove the exit bit?

  • #9
    Regular Coder
    Join Date
    Sep 2008
    Posts
    697
    Thanks
    8
    Thanked 17 Times in 16 Posts
    Yep, I fixed it.

    Thanks guys.
    MY MSN: Sith717@Hotmail.com
    PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
    PM me anytime for HTML, PHP or web design help. I will be glad to help you out.


  •  

    Posting Permissions

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