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. -
<?php
-
session_start();
-
$session_id = $_SESSION['user_id'];
-
if($session_id == null){
-
header("location:Student_Edit.php");
-
die();
-
}
-
include 'Connect.php';
-
$flag = "success";
-
function rollbackData(){
-
mysql_query(" ROLLBACK ");
-
global $flag;
-
$flag = "error";
-
if(mysql_error() != null){
-
die(mysql_error());
-
}
-
}
-
$student_id = $_POST['student_id'];
-
$first_name = $_POST['first_name'];
-
$last_name = $_POST['last_name'];
-
$gender = $_POST['gender'];
-
$date_of_birth = date("Y-m-d",strtotime($_POST['date_of_birth']));
-
$contact_no = $_POST['contact_no'];
-
$grade = $_POST['grade'];
-
$section = $_POST['section'];
-
$LRN = $_POST['LRN'];
-
$email1 = $_POST['email1'];
-
$email2 = $_POST['email2'];
-
$address = $_POST['address'];
-
$description = $_POST['description'];
-
$imagename = "";
-
$flag= "";
-
mysql_query("SET AUTOCOMMIT = 0 ");
-
if(mysql_error() != null){
-
die(mysql_error());
-
}
-
$query = "UPDATE student_information SET first_name='$first_name',last_name='$last_name',";
-
$query .= "gender='$gender',date_of_birth='$date_of_birth',contact_no='$contact_no',grade='$grade',section='$section',";
-
$query .= "LRN='$LRN',email1='$email1',email2='$email2',address='$address',description='$description'";
-
$query .= " WHERE student_id='{$_SESSION['user_id']}'";
-
$result = mysql_query($query, $link_id);
-
if(mysql_error() != null){
-
die(mysql_error());
-
}
-
if($result)
-
{
-
$flag = "success";
-
}
-
else
-
{
-
$flag = "error";
-
}
-
header("location:Student_Edit.php?flag=$flag&student_id=student_id=$student_id");
-
?>
-
Please advise
1 8938
try to put this code after your session_start() ; ob_start(); Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
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,...
|
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
|
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 ...
| |
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?
|
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...
|
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');
|
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
|
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"};
|
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...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| | |