473,549 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

20 New Member
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 8938
Exequiel
288 Contributor
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
3921
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 declaration of struct net_arch_t which is located in another header file, e.g., nn.h. I saw somewhere that it should be avoided to include another header...
1
8282
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 row that includes the name of father, mother and the number of children. Then there would be another table with one row for each child and the rows...
18
2724
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 (collection of files) which are not required, except for one header file's contents. I'd say 'No, header files should be included in the C source,...
2
2107
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
1296
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 columns in a single header column? i want to show like this - Maruti_800 Maruti_Zen ...
1
2485
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 significantly slow down compilation time? Also, would this affect processing speed?
1
24114
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 header from script. Bad header= : padata.pl /perl/pema/padata.pl did not send an HTTP header malformed header from script. Bad header= Missing...
4
2037
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
5544
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 the + character, and then sending the remainder into fscanf() like
1
2439
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", "Distance", "Selected"};
0
7521
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7451
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7473
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7810
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5369
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1944
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.