Jump to content

why does my page get messed up?


blyz

Recommended Posts

the php works fine but when i enter invalid data in my registration form, it messes up the page look:

http://www.software-god.com/register.php

here is the source:

<?
include("include/session.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>


  <title>.:: Software God - Unlimited Software and Serial Codes</title>
  <style>
body {background-color: #000;}
td {font-size: 10px; font-family: Verdana, Tahoma; color: #bbbbbb;}
td.nav {padding-left: 4px;}
a {font-size: 10px; font-family: Verdana, Tahoma; color: #775555; text-decoration:none;}
a:hover {font-size: 10px; font-family: Verdana, Tahoma; color: #775555; text-decoration:underline;}
.navhead {display: block; background-color:#222222; border: 1px dotted #555555; text-align:center; font-weight: bold;}
  </style>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">

<center>
<table id="Table_01" background="images/overall_bg.gif" border="0" cellpadding="0" cellspacing="0" width="739">

<tbody>
    <tr>

	<td colspan="7">
		<img src="images/index_01.gif" alt="" height="10" width="739"></td>

</tr>

<tr>

	<td colspan="7">
		<img src="images/index_02.gif" alt="" height="7" width="739"></td>

</tr>

<tr>

	<td colspan="7">
		<img src="images/index_03.gif" alt="" height="187" width="739"></td>

</tr>

<tr>

	<td colspan="4">
		<img src="images/index_04.gif" alt="" height="70" width="173"></td>

	<td colspan="3">
		<img src="images/index_05.gif" alt="" height="70" width="566"></td>

</tr>

<tr>

	<td>
		<img src="images/index_06.gif" alt="" height="31" width="5"></td>

	<td class="nav" background="images/nav.gif" height="31" valign="top" width="163">
	<!-- Navigation Starts Here -->
<div class="navhead">Navigation</div>
» <a href="/index.php">Home</a><br>
» <a href="/login.php">Login</a><br>
» <a href="/register.php">Join</a><br>
» <a href="/aboutus.php">About Us</a><br>
<div class="navhead">Members Area</div>
» <a href="/software.php">Software</a><br>
» <a href="/serials.php">Serials</a><br>
» <a href="/music.php">Music</a><br>
» <a href="/Movies.php">Movies</a><br>
» <a href="/Games.php">Games</a><br>
» <a href="/ebooks.php">E-books</a><br>
» <a href="/forums.php">Forums</a><br>
<div class="navhead">Misc.</div>
» <a href="/submitfile.php">Submit a File</a><br>
» <a href="/badlink.php">Report Broken Link</a><br>
» <a href="/linkus.php">Link To Us</a><br>
» <a href="/feedback.php">Feedback</a><p>
<!-- NAvigation End -->
	</td>

	<td colspan="3">
		<img src="images/index_08.gif" alt="" height="31" width="11"></td>

	<td background="images/content.gif" valign="top" width="556">
	<!-- Content Starts Here! --><span style="font-weight: bold;">         <br>






<?
/**
* The user is already logged in, not allowed to register.
*/
if($session->logged_in){
   echo "<h1>Registered</h1>";
   echo "<p>We're sorry <b>$session->username</b>, but you've already registered. "
       ."<a href=\"main.php\">Main</a>.</p>";
}
/**
* The user has submitted the registration form and the
* results have been processed.
*/
else if(isset($_SESSION['regsuccess'])){
   /* Registration was successful */
   if($_SESSION['regsuccess']){
      echo "<h1>Registered!</h1>";
      echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, your information has been added to the database, "
          ."you may now <a href=\"main.php\">log in</a>.</p>";
   }
   /* Registration failed */
   else{
      echo "<h1>Registration Failed</h1>";
      echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
          ."could not be completed.<br>Please try again at a later time.</p>";
   }
   unset($_SESSION['regsuccess']);
   unset($_SESSION['reguname']);
}
/**
* The user has not filled out the registration form yet.
* Below is the page with the sign-up form, the names
* of the input fields are important and should not
* be changed.
*/
else{
?>

<h1>Register</h1>
<?
if($form->num_errors > 0){
   echo "<td><font size=\"2\" color=\"#ff0000\"></font></td>";
}
?>
<form action="process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td>Email:</td><td><input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><td><? echo $form->error("email"); ?></td></tr>

<tr><td colspan="2" align="right">
<input type="hidden" name="subjoin" value="1">
<input type="submit" value="Join!"></td></tr>
<tr><td colspan="2" align="left"><a href="main.php">Back to Main</a></td></tr>
</table>
</form>

<?
}
?>






      </span>
      <p>
   </p>

   
	</td>

	<td>
		<img src="images/index_10.gif" alt="" height="31" width="4"></td>

</tr>



<tr>

	<td>
		<img src="images/index_13.gif" alt="" height="76" width="5"></td>

	<td>
		<img src="images/index_14.gif" alt="" height="76" width="163"></td>

	<td>
		<img src="images/index_15.gif" alt="" height="76" width="1"></td>

	<td colspan="2">
		<img src="images/index_16.gif" alt="" height="76" width="10"></td>

	<td>
		<img src="images/index_17.gif" alt="" border="0" height="76" width="556"></td>

	<td>
		<img src="images/index_18.gif" alt="" height="76" width="4"></td>

</tr>


<tr>

	<td>
		<img src="images/spacer.gif" alt="" height="1" width="5"></td>

	<td>
		<img src="images/spacer.gif" alt="" height="1" width="163"></td>

	<td>
		<img src="images/spacer.gif" alt="" height="1" width="1"></td>

	<td>
		<img src="images/spacer.gif" alt="" height="1" width="4"></td>

	<td>
		<img src="images/spacer.gif" alt="" height="1" width="6"></td>

	<td>
		<img src="images/spacer.gif" alt="" height="1" width="556"></td>

	<td>
		<img src="images/spacer.gif" alt="" height="1" width="4"></td>

</tr>

  </tbody>
</table>

</center>


<div style="font-size: 0.8em; text-align: center; margin-top: 1em; margin-bottom: 1em;">
Design provided by <a href="http://www.freewebtemplates.com/">Free Web Templates</a> - your source for free website templates
</div>

</body>
</html>

 

Link to comment
https://forums.phpfreaks.com/topic/61224-why-does-my-page-get-messed-up/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.