View Full Version : Page gets cut off

12-07-2009, 12:03 AM
Hello, I currently have this page:


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:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<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 {
<style type="text/css">/*\*/@import url(css/news-2.css);/**/</style>


<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 id="sessionText">
You are logged in as <span id="accountName">



<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 id="content">
<div id="article">
<div class="sectionHeader">
<div class="left">

<div class="right">

<div class="plaque">
Forgotten Password
<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'
<img src="img/spacer.gif" alt="This is spacer.gif" height="37">


<div class="newsJustify">


// 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 style="float: right;">
<input size="40" class="only" style="border:solid 1px #675f39; padding:4px 2px; font-size:12px;" type="text" name="email_address">

<input id="submit" class="submit-button" type="submit" value="Reset Password" >


elseif (empty($email_address))
echo $empty_fields_message;
$email_address = mysql_real_escape_string($email_address);
$status = "OK";
//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";
$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";
$i = 0;
while ($i <= 7)
$num = rand() % 33;
$tmp = substr($salt, $num, 1);
$pass = $pass . $tmp;
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

Once logged in you can change your password

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>";
echo $msg;


<div class="clear"></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>.

<a class="jagex.com" href="http://www.jagex.com" target="_blank">

<img src="img/main/layout/jagex2.png?5">




12-07-2009, 01:00 AM
I can't see anything wrong in IE/FF/OP.

12-07-2009, 01:03 AM
So it works??


12-07-2009, 01:15 AM
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 -

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?

12-07-2009, 01:17 AM
No, use a fake email. not load it blank.

Use a example email like: my@site.com

And you will see the problem.

12-07-2009, 01:22 AM
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.

12-07-2009, 01:27 AM
I know, my php coding is messing it up, but I am unable to fix it, have any idea why?

12-07-2009, 01:28 AM
bucket seems to have solved it now anyway. Did you remove the exit bit?

12-07-2009, 01:32 AM
Yep, I fixed it. :)

Thanks guys.