473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Warning: Header may not contain more than a single header, new line detected in C:\xa

Hi there,

i have recieved this notice

Warning: Header may not contain more than a single header, new line detected in C:\xampp\htdocs\a\Student_Edit_Handler.php on line 53

and these are my codes. Kindly help me to fix this.
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.     session_start();
  3.     $session_id = $_SESSION['user_id'];
  4.     if($session_id == null){
  5.        header("location:Student_Edit.php");
  6.        die();
  7.     }
  8.     include 'Connect.php';
  9.     $flag = "success";
  10.     function rollbackData(){
  11.         mysql_query(" ROLLBACK ");
  12.         global $flag; 
  13.         $flag = "error";
  14.         if(mysql_error() != null){
  15.             die(mysql_error());
  16.         }
  17.     }
  18.     $student_id = $_POST['student_id'];
  19.     $first_name = $_POST['first_name'];
  20.     $last_name = $_POST['last_name'];
  21.     $gender = $_POST['gender'];
  22.     $date_of_birth = date("Y-m-d",strtotime($_POST['date_of_birth']));
  23.     $contact_no = $_POST['contact_no'];
  24.     $grade = $_POST['grade'];
  25.     $section = $_POST['section'];
  26.     $LRN = $_POST['LRN'];
  27.     $email1 = $_POST['email1'];
  28.     $email2 = $_POST['email2'];
  29.     $address = $_POST['address'];
  30.     $description = $_POST['description'];
  31.     $imagename = "";
  32.     $flag= "";
  33.         mysql_query("SET AUTOCOMMIT = 0 ");
  34.         if(mysql_error() != null){
  35.             die(mysql_error());
  36.         }
  37.     $query = "UPDATE student_information SET first_name='$first_name',last_name='$last_name',";    
  38.     $query .= "gender='$gender',date_of_birth='$date_of_birth',contact_no='$contact_no',grade='$grade',section='$section',";
  39.     $query .= "LRN='$LRN',email1='$email1',email2='$email2',address='$address',description='$description'";     
  40.     $query .= " WHERE student_id='{$_SESSION['user_id']}'";      
  41.     $result = mysql_query($query, $link_id);
  42.     if(mysql_error() != null){
  43.         die(mysql_error());
  44.     }
  45.     if($result)
  46.     { 
  47.         $flag = "success";
  48.     }
  49.     else
  50.     {
  51.          $flag = "error"; 
  52.       }
  53.     header("location:Student_Edit.php?flag=$flag&student_id=student_id=$student_id");
  54. ?>
  55.  
Please advise
Aug 3 '14 #1
1 8901
Exequiel
288 256MB
try to put this code after your session_start();
ob_start();
Aug 3 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Newsgroup - Ann | last post by:
I have a library function like GetOptions( ..., struct net_arch_t netArch, ....) and put the declaration into a regular header file like getopt.h. But this function declaration also needs the...
1
by: R. P. | last post by:
Anybody knows a way to produce output from a SELECT statement on a single line, instead of each hit on a separate line? Here is what I mean: let's say I have a table listing families, one per...
18
by: John Smith | last post by:
Hi all What does the group think of the practise of including one header file from inside another? I have some legacy code where this has been done, and it creates a dependency on a module...
2
by: niv | last post by:
Hello, I have a grid that consists of 6 columns and I want 3 of the columns to have a single header and the other 3 columns to have another header... Is this possible? How? Thanks, niv
0
by: vinaykumar Maladkar | last post by:
Hi All, I m using Visual studio 2005 and C#. i want to show comparative data of different cars like their price , engine , capacity etc. So i am using DataGridView. but How to group one or more...
1
by: enrightb13 | last post by:
I am writing a large real-time embedded in C. Is it better to include all header files in one header file for simplicity, and include this single header file in the main file, or does this...
1
by: Shalako | last post by:
I check my error log and see these entries: malformed header from script. Bad header= Missing gauge reports are ind: padata.pl /perl/pema/padata.pl did not send an HTTP header malformed...
4
by: fruityfreak | last post by:
is it possible to have more than one header(location: ); or can i have one header('Refresh: 3; url=login.php'); and echo header('location: index.php');
59
by: David Mathog | last post by:
Apologies if this is in the FAQ. I looked, but didn't find it. In a particular program the input read from a file is supposed to be: + 100 200 name1 - 101 201 name2 It is parsed by reading...
1
by: Xavier Serrand | last post by:
Defining a const array in header, i can not get ride of a warning : const char * ROW_INFO_NAMES = {"Nbr Val", "Nbr Ok", "Nbr Ko", "Moy", "Var", "Ety", "Moy OK", "Moy KO", "Var OK", "Var KO",...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.