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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:01:41+00:00 2026-06-15T22:01:41+00:00

<?php echo $_REQUEST[‘uname’]; echo $_REQUEST[‘pass’]; $res= $mysql_query(select * from `sec` where uname=’$_REQUEST[‘uname’]’ AND `pass`=’$_REQUEST[‘pass’]’);

  • 0
<?php
 echo $_REQUEST['uname'];
 echo $_REQUEST['pass'];

$res= $mysql_query("select * from `sec` where uname='$_REQUEST['uname']' AND    `pass`='$_REQUEST['pass']'");

if(mysql_num_rows($res)>0)
{
 header('location:home.php')
}
else
{
 header('location:index.php')
}

?>

What’s this error:header information cannot modify...
even the username and passwords are correct it is not redirecting to another page and giving this warning..
why this error is coming??

  • 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-15T22:01:42+00:00Added an answer on June 15, 2026 at 10:01 pm

    All the php work should be done before sending any data to the browser.
    If You are using your own code you should write code in this way

    <?php 
    include "action/home.php"; //don't echo anything here
    include "view/home.php"; 
    ?>
    

    OR

    If you have to redirect after the header information have already been set, you should use javascript function to redirect as

    if(mysql_num_rows($res)>0)
    { ?>
      <script type="text/javascript">
      window.location="home.php";
      <script>
    <?
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My code is somewhat like this: <?php if($_REQUEST['post']) { $title=$_REQUEST['title']; $body=$_REQUEST['body']; echo $title.$body; }
when I am displaying(PHP echo) an image name from the server,it's shows like, Resource
For example… This PHP code <?php echo '<html>'; echo '<body>'; echo '<h1>Header One</h1>'; echo
Possible Duplicate: XMLHttprequest sends an empty post Javascript part PHP part <?php echo $_REQUEST['p']
using <?php echo $_SERVER['REQUEST_URI'] ;?> when the url is: www.site.com/a/b/c/#d does not show the
Imagine this simple form <form action=<?php echo $_SERVER['REQUEST_URI']; ?> method=post> <fieldset> <legend>Contact Me</legend> <label
PHP Echo or Print functions does not show anything when php is busy with
PHP echo function is not outputing strings in the format of html tag like
Given hello.php: <?php echo Hello; ?> rendering the page works fine and returns Hello
So I have a php file called Time.php: <?php echo (( $DateTime.date(n/j/Y g:i:s A).Hour

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.