Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6990537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:21:57+00:00 2026-05-27T19:21:57+00:00

<?php session_start(); include(connection.php); if(isset($_SESSION[‘uname’])) { header(location:account.php); die(); } ?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML

  • 0
<?php
session_start();
include("connection.php");
if(isset($_SESSION['uname']))
{
    header("location:account.php");
    die();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Catch-22</title>
<link rel="stylesheet" href="style.css" />
<!--[if gte IE 9]>
  <style type="text/css">
    .gradient {
       filter: none;
    }
  </style>
<![endif]-->
<script type="text/javascript">
function validateForm()
{
var u=document.forms["registration"]["username"].value;
var p=document.forms["registration"]["password"].value;
var p2=document.forms["registration"]["password2"].value;
var e=document.forms["registration"]["email"].value;
var c=document.forms["registration"]["college"].value;
var f=document.forms["registration"]["phone"].value;


if (u==null || u=="")
  {
  alert("Enter a Username");
  return false;
  }
 if (p==null || p=="")
  {
  alert("Enter a Password");
  return false;
  }
  if (p2==null || p2=="")
  {
  alert("Enter Password again");
  return false;
  }

  if(p!=p2)
  {
     alert("Password do not match");
     return false;
  }

  if (e==null || e=="")
  {
  alert("Enter a Email");
  return false;
  }

    var atpos=e.indexOf("@");
    var dotpos=e.lastIndexOf(".");
    if (atpos<1 || dotpos<atpos+2 || dotpos+2>=e.length)
    {
      alert("Not a valid e-mail address");
      return false;
    }

  if (c==null || c=="")
  {
  alert("Enter a College Name");
  return false;
  }
  if (f==null || f=="")
  {
  alert("Enter a Phone");
  return false;
  }

  if(!isInteger(f))
  {
      return false;
  }
  if(f.length<10)
  {
    alert("Phone number should have 10 digits");  
    return false;
  }
  return true;
 }



 function isInteger(s)
{
      var i;
    s = s.toString();
      for (i = 0; i < s.length; i++)
      {
         var c = s.charAt(i);
         if (isNaN(c)) 
       {
        alert("Phone number should be integer");
        return false;
       }
      }
      return true;
}
</script>
</head>
<body>
<div id="header">
    <div id="catch-b">
        <div class="container">
            <div id="catch-l">
                <div class="nav">
                    <ul>
                        <li><a href="faq.php">FAQ</a></li>
                        <li class="star"></li>
                        <li><a href="register.php">REGISTER</a></li>
                        <li class="star"></li>
                    </ul>
                </div>
                <div id="reg">LOGIN</div>
            </div>
            <a id="catch" href="index.php"></a>
            <div id="catch-r">
                <div class="nav">
                    <ul>
                        <li class="star"></li>
                        <li><a href="login.php">LOGIN</a></li>
                        <li class="star"></li>
                        <li><a href="contact.php">CONTACT</a></li>                        
                    </ul>
                </div>
                <div id="scr">TOP SCORES</div>
            </div>
        </div>
    </div>
</div>
<div class="container">
    <div id="register">
        <div class="content" id="reg-form">
        <form name="registration" method="post" action="reg.php" onSubmit="return validateForm()" >
                <table>
                    <tr><td>Username</td><td>:</td><td colspan="2" class="form-input"><input type="text" name="username" /></td></tr><tr><td></td></tr>
                    <tr><td>Password</td><td>:</td><td colspan="2" class="form-input"><input type="password" name="password"/></td></tr><tr><td></td></tr>
                    <tr><td>Retype</td><td>:</td><td colspan="2" class="form-input"><input type="password" name="password2" /></td></tr><tr><td></td></tr>
                    <tr><td>Email</td><td>:</td><td colspan="2" class="form-input"><input type="text" name="email"/></td></tr><tr><td></td></tr>
                    <tr><td>College</td><td>:</td><td colspan="2" class="form-input"><input type="text" name="college" /></td></tr><tr><td></td></tr>
                    <tr><td>Mobile</td><td>:</td><td colspan="2" class="form-input"><input type="text" name="phone" /></td></tr><tr><td></td></tr><tr><td></td></tr>
                    <tr><td colspan="2">&nbsp;</td><td colspan="2"><input name="submit" class="new-button gradient" type="submit" value="REGISTER" /></td></tr>
                </table>
            </form>
      </div>
        <div class="shadow"></div>
    </div>
    <div id="scores-wrap">
        <div id="scores">
            <table width="100%">
                <tr><th align="left">Username</th><th align="right">Points</th></tr>
                <tr><td>Tharun</td><td align="right">09</td></tr>
                <tr><td>Jilson</td><td align="right">09</td></tr>
                <tr><td>Jismon</td><td align="right">08</td></tr>
                <tr><td>Binish</td><td align="right">07</td></tr>
                <tr><td>Tobin</td><td align="right">06</td></tr>
                <tr><td>Anoop</td><td align="right">05</td></tr>
            </table>
        </div>
        <div id="shadow2"></div>
    </div>
</div>
</body>
</html>

EDIT
Thanks, I got the problem fixed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:21:58+00:00Added an answer on May 27, 2026 at 7:21 pm

    Check the below statement in your new page. Value of name attribute is different from original one. In the original it was “username” but in the new it is “name”.

    <tr><td>Name</td><td>:</td><td colspan="2" class="form-input"><input type="text"    
    name="name" /></td></tr><tr><td></td></tr> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here is the code <?php session_start(); if(!isset($_SESSION['user_name'])) { header('Location: login.php'); } $conn = mysql_connect(localhost,
<?php session_start(); // store session data $_SESSION['count']=0; ?> <html><head></head> <body> <?php include (getElement.php); echo
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN> <?php include('db_connection.php'); error_reporting(E_ALL); session_start(); ?> <html> <head>
<?php session_start(); include(connect.php); $timeout = 60 * 30; $fingerprint = md5($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']); if(isset($_POST['userName']))
I have this code <?php session_start(); if (isset($_GET[cmd])) $cmd = $_GET[cmd]; else die(You should
I have the following pages: page1.php <?php if (isset($_GET['link'])) { session_start(); $_session['myvariable'] = 'Hello
Heres my code <?php session_start(); include('config.php'); if(isset($_GET['search_word'])) { // echo $_GET['search_word'] . '<br />';
Index.php <?php session_start(); require_once('../inc/db/dbc.php'); include('login_helper.php'); ?> <!-- html form --> Login/Logout Links depending on
I have a very simple test page for PHP session. <?php session_start(); if (isset($_SESSIONS['views']))
I have this code in script.php: <?php session_start(); $user_session = $_SESSION['u_name']; class check_sess {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.