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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:56:18+00:00 2026-06-07T23:56:18+00:00

I have written a simple application which has login page. After login search insertion

  • 0

I have written a simple application which has login page. After login search insertion buttons are there. I build this simple application and run successfully last month. But now when i am using this now my pages are not redirecting to next page. i double checked my syntax.

i googled for the answer and found ob_start() method. And now my application is running successfully.

when the first time i have used this application i didn’t use ob_start. But why its not working now without the ob_start(); method.

Please explain.

Search function :

            $email = $_POST['search'];
    $sql = "select * from employee_details where ";
    if($email){
    $sql .= " email = '$email' ";
    }

    $rv = mysql_query($sql);
    if(mysql_num_rows($rv) == 0){
    $errmsg_arr[] = "Employee records are not found.";
    $page = "HomePage.php";
    $errflag = true;    
    errors($page,$errmsg_arr, $errflag );
    }
    while( $row = mysql_fetch_array($rv)){
     $var['employee_id'] = $row['employee_id'];
     $var['employeename'] = $row['employee_name'];
     $var['email'] = $row['email'];
     $var['phone'] = $row['phone'];
     $var['address1'] = $row['address1'];
     $var['state'] = $row['state'];
     $var['country'] = $row['country'];
    }
    addvars($var);
    header("location: EmployeeDetails.php");    

addvars function:

function addvars($vars) {
    session_start();
$_SESSION[] = array();  

    foreach($vars as $keys => $vals) {  

$_SESSION[$keys] = $vals;   

}
 }

Errors Function:

function errors($page,$errmsg_arr, $errflag){
if($errflag) {
    session_start();
    $_SESSION['ERRMSG_ARR'] = $errmsg_arr;
    session_write_close();
    header("location: $page");
    exit();
}
}
  • 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-07T23:56:20+00:00Added an answer on June 7, 2026 at 11:56 pm

    Most likely because you try to set headers when they’re already sent out. (you can try to adjust output buffering instead of using ob_start if it bothers you).

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

Sidebar

Related Questions

I have a simple web application written in java which has servlets accessing the
I have written a simple web Application which is running(on Tomcat Server) fine on
I have written very very simple console application which supports some command line options.
I have written a simple WPF application in which I wanted to test the
I have written a tab based iPad application which has done well. I never
I have a very simple problem. I have an application which is written in
I have a web application written in Django that has one specific page I'd
I have written a very simple application to update my twitter status on a
I have written a very simple application tha accepts batches of telemetry log rows
I have written a simple automation script for deploying and restarting my twisted application

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.