Page 1 of 1
How to check PostBack condition
Posted: Fri Nov 28, 2008 1:28 am
by iijb
Hi all,
I want to check postback condition in my application. Please help me how is this possible.
Thanks
iijb
Re: How to check PostBack condition
Posted: Fri Nov 28, 2008 2:03 am
by requinix
If you don't give much of a question then I can only assume you don't want much of an answer:
Depends what the condition is, but you'll surely need to use some variables, maybe a couple functions, and control blocks like if or switch.
Re: How to check PostBack condition
Posted: Fri Nov 28, 2008 2:46 am
by iijb
Hi,
I got an error when redirecting to another page. Error is attached below.
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\sregstn1.php:118) in C:\wamp\www\sregstn1.php on line 238
and the code is:
if(mysql_num_rows($result))
{
if($admno==$admission_no&&$stid==$student_id&&$usrid!="")
{ echo "Already Registered User"; }
else if($admno==$admission_no&&$stid==$student_id&&$usrid=="")
{
header("Location: register.php");
}
}
Why is this error occuring. I am a newbie , I think I have to check postback. Please help me.
iijb
Re: How to check PostBack condition
Posted: Fri Nov 28, 2008 5:13 am
by iijb
Hi,
I fixed the problem. There is some whitespaces in the code. I remove all the whitespaces and the header error gone.
Thanks all
iijb