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

  • SEARCH
  • Home
  • 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 7882245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:14:17+00:00 2026-06-03T04:14:17+00:00

I made a login/register page. It works fine on chrome and firefox, but doesnt

  • 0

I made a login/register page. It works fine on chrome and firefox, but doesnt work on internet explorer (8, 9). After clicking any submit button ie redirect to index page. I have the same problem on another page based on this code.

Here is html code:

<?php

$log_in=false;
$token_sent=0;
$errors1 = array();
$missing1 = array();
$errors = array();
$missing = array();

if(isset($_POST['submit'])){
     $expected = array('login', 'email', 'pwd');
     $required = array('login', 'email', 'pwd');
     require('./rejestracja.inc.php');
}

if ($token_sent) {
    header('Location: (..) '); 
    exit;
}

if(isset($_POST['submit1'])) {
    $expected=array('login1','pwd1');
    $required=array('login1','pwd1');
    require('./login.inc.php');

    if($log_in) {
        if (isset($_SESSION['name']) && !empty($_SESSION['name'])) {
            unset($_SESSION['login1']);
            if (isset($_COOKIE[session_name()])) {
                setcookie(session_name(), '', time()-86400, '/');
            }
            session_destroy();
        }

        if (isset($_POST['login1'])) {
            session_start();
            $_SESSION['name'] = $login1 ;
        }
        header('Location: http:// (...) ');  
        exit;
    }
}

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title></title>
    <meta name="description" content="">
    <meta name="copyright" content="Copyright (c) 2012 k">
    <meta name="author" content="">
    <link href="style.css" rel="stylesheet" type="text/css" media="screen">
    <link href="login.css" rel="stylesheet" type="text/css" media="screen"> 
</head>

<body>
<div id="wrap">
    <?php include('./login_menu.inc.php');?>
    <div id="header">
        <h1></h1>
    </div>
    <?php include('./fb.inc.php');?>
    <?php include('./menu.inc.php');?>
    <?php include('./w_budowie.inc.php');?>

    <div id='left'>
        <div id='info'>
            <h1 class='title'>LOGIN</h1> <br/>
            <form class='form' name="login1" action=" " method="post">


                <?php if ($missing1) { ?>
            <span class="warning">...</span><br/>
            <?php } ?>

            <?php if(isset($errors1['wrong'])){ ?>
            <span class="warning">...</span><br/>
            <?php } ?>

            <?php if(isset($errors1['not_verified'])){ ?>
            <span class="warning">...</span><br/>
            <?php } ?>

            <label for="login1">Login: </label>
            <input type="text" name="login1" 
            <?php if ($missing1 || $errors1) {
            echo 'value="' . htmlentities($login1, ENT_COMPAT, 'UTF-8') . '"';
            } ?>
            />

            <br/>           
            <label for="pwd1">Password:</label>
            <input type="password" name="pwd1" /> <br/>

            <br/>           
            <span class='submit'><input name="submit1" type="submit" value="LOGIN" /></span>
            </form> 

            <br/>
        </div>  
    </div>

    <div id='right'>
        <div id='info'>
            <h1 class='title'>REGISTRATION</h1> <br/>
            <form class='form' name="register" action=" " method="post">

                <label for="login">Login: </label>
                <input type="text" name="login" 
                <?php if ($missing || $errors) {
                echo 'value="' . htmlentities($login, ENT_COMPAT, 'UTF-8') . '"';
                } ?>
                /> 
                      <?php if ($missing && in_array('login', $missing)) { ?>
                      <span class="warning">...</span>
                      <?php 
                       } elseif(isset($errors['login_mini'])){ ?>
                      <span class="warning">...</span>
                      <?php 
                       } elseif(isset($errors['login_maxi'])){ ?>
                      <span class="warning">...</span>
                       <?php
                       } elseif(isset($errors['login'])){ ?>
                      <span class="warning"> A-Z, a-z, 0-9.</span>
                      <?php 
                       } elseif(isset($errors['login_exist'])){ ?>
                      <span class="warning">...</span>
                       <?php } ?>

                <br/>


                <label for="email">Email: </label>
                <input type="text" name="email"
                <?php if ($missing || $errors) {
                echo 'value="' . htmlentities($email, ENT_COMPAT, 'UTF-8') . '"';
                } ?>
                /> 
                    <?php if ($missing && in_array('email', $missing)) { ?>
                      <span class="warning">...</span>
                      <?php } elseif(isset($errors['email'])){ ?>
                      <span class="warning">...</span>
                      <?php } elseif(isset($errors['email_exist'])){ ?>
                      <span class="warning">...</span>
                       <?php } ?>

                <br/>

                <label for="pwd">Password:</label>
                <input type="password" name="pwd" />
                <?php if ($missing && in_array('pwd', $missing)) { ?>
                      <span class="warning">...</span>
                      <?php 
                       } elseif(isset($errors['pwd_mini'])){ ?>
                      <span class="warning">...</span>
                      <?php 
                       } elseif(isset($errors['pwd_maxi'])){ ?>
                      <span class="warning">...</span>
                       <?php } ?>       
                <br/>
                <span class='submit'><input type="submit" name="submit" value="REGISTER" /></span>          
            </form>
            <br/>
        </div>  
    </div>
    <?php include('./footer.inc.php'); ?>
</div>
</body>
</html>

Here is ‘login.inc.php’ code:

<?php

$login1 = "";
$pwd1 = "";
$salt = "(...)";


/*---------------con------------------------*/
include('./sql_connect.inc.php');

/*---------------------------------------------*/
foreach ($_POST as $key => $value) {
     $temp = is_array($value) ? $value : trim($value);
     if (empty($temp) && in_array($key, $required)) {
          $missing1[] = $key;
     } elseif (in_array($key, $expected)) {
          ${$key} = $temp;
     }
}


if(!$missing1){
     $login1 = mysql_real_escape_string($login1); 
     $hash = $salt . $pwd1;
     for ( $i = 0; $i < 100; $i ++ ){
         $hash = hash('sha256', $hash);
     }

/*---------------COMPARE-----------------*/
      $result = mysql_query("SELECT user_nick='$login1' FROM users WHERE user_password='$hash'") or die('Sorry, we could not count the number of results: ' . mysql_error());
     if($result){
          if(mysql_result($result, 0)){

/*-------IS ACTIVATED?------------------------------*/
              $verified =  mysql_query("SELECT user_verified='yes' FROM users WHERE user_nick='$login1'");
              if($verified){
                  if(mysql_result($verified, 0)){
                      $log_in=true;          
                  }else{
                       $errors1['not_verified'] = true; 
                  }
               }
          }else{
               $errors1['wrong'] = true;    
          }
     }
}
mysql_close($con);

?>
  • 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-06-03T04:14:18+00:00Added an answer on June 3, 2026 at 4:14 am

    Are you really using <form class='form' name="register" action=" " method="post"> ?
    It could come from here, try with action="#"

    There won’t have any cross browser problem with PHP, it comes from HTML (generated or not)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have made a login and register page. but my passwords aren't encrypted yet.
I need to launch an app I've made just after login, before anything else
I have made a web application that uses master page for Login & Logout
I have made an android app which working fine. I implemented the Login functionality
I'm having a problem with a simple html login page I made, where when
I made a simple login form where a user can click on a register
Ok so I have made a login action but I'm a bit confused on
I've created a login and register page where people can login or register if
I made a login page... when even i enter the login page then the
I have made a login app in android .The user gets logged in after

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.