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 8929069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:35:36+00:00 2026-06-15T08:35:36+00:00

I have an index.php page in which, there is a login form. Index.php: <?php

  • 0

I have an index.php page in which, there is a login form.

Index.php:

<?php include_once("include/header.php");?>

</head>

<body>

<div class="mainContainer">
    <div class="header"><!--Header start-->

        <!--Inlcluding Login Barr-->
        <?php include("include/loginBar.php");?>           

    <div class="clear"></div>
    </div><!--Header end-->

    <div class="centerContent"><!--Center content start-->        
    </div><!--center content end-->

    <div class="clear"></div>
    <?php include("include/footer.php");?> 

</div>

</body>
</html>

header.php:

<?php session_start();
ob_start();
?>
<!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" /> 

<link type="text/css" href="css/mainStylesheet.css" rel="stylesheet" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

footer.php

<? ob_end_flush(); ?>

loginBar.php

        <div class="loginBar">

            <form name="Login" id="Login" action="actions.php" method="post">
                  <span class="label">Login</span> 
                  <input type="text" name="name" id="username" value="Username" onBlur="if(this.value==''){this.value=this.defaultValue;}" onFocus="if(this.value==this.defaultValue){this.value='';}" />
                  <input type="password" name="password" id="userpassword" value="Password" onBlur="if(this.value==''){this.value=this.defaultValue;}" onFocus="if(this.value==this.defaultValue){this.value='';}"/>
                  <input class="loginButton" id="loginButton" type="submit" value="Go" />

                  <input type="hidden" value="loginValues"  name="login" id="login"/>
            </form>
        </div>

actions.php

<?php session_start();

echo $_POST['name']; echo $_POST['password'];

if(isset($_POST['login']) && $_POST['login']=="loginValues"){

    echo "HAHAHAHAHA";  
}

?>

The problem is, form values are echoed outside the IF block in actions.php page, but nothing works inside this block. That means form values are successfully transferred.

In firebug console, I see an error stating “The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol.”

I have tried all options and have placed this line after HEAD tag :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> , but nothing works.

Please help me. Thanks.

  • 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-15T08:35:37+00:00Added an answer on June 15, 2026 at 8:35 am

    Unless it is just a typo in what you copy/pasted you have an input that isn’t closed, which probably kills the input after it (login in this case).

    <input class="loginButton" id="loginButton" type="submit" value="Go"
    

    should be

    <input class="loginButton" id="loginButton" type="submit" value="Go" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my index.php page and just afrer my header i want to include
I have folders and pages /admin/add/index.php, /admin/edit/index.php & /admin/view/index.php which all are requiring page
I have a page, index.php, that shows information based on a mysql db. There
Okay, here is my situation. I have a page, index.php, which is the mainsite
I have three files index.php login.php auth.php My login form is based on my
I have an index.php page which includes a navBar.inc page to render the top
I have a index.php page that is the main page. All pages are included
i have a question, i have a index.php page that is the intro of
I have the following scenario. I have a index.php page with the following JQuery
I have an index page index.php , and when the user clicks on a

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.