Use of output buffering and a question about fixing a notice.
From: Eamon Reyn (eamonreyn_at_clear.net.nz)
Date: 05/31/04
- Next message: Thibaut: "Re: ask help with php + mysql with salary!!!!!!!!!!!!!!"
- Previous message: Tony P.: "Re: Setting Up MySQL?"
- Next in thread: J.O. Aho: "Re: Use of output buffering and a question about fixing a notice."
- Reply: J.O. Aho: "Re: Use of output buffering and a question about fixing a notice."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 May 2004 22:10:03 -0700
Hi People,
I am working on a PHP application that was designed with output
buffering on and am wondering if this was the best approach. The
reason I have started wondering about the wisdom of the decision is
when I moved the application to a machine with a newer version of PHP
on it I started getting bugs that went away when I switched on output
buffering (using output_buffering = 4096).
Any reading suggestions would be appreciated as well as general
opinions.
As well as that I have the following code throwing a notice and am
wondering about the best way to fix it.
I have a form which requires user input, if the input is invalid the
form re-displays with the same data and error messages where
appropriate.
the problem occurs with this code:
<input type="radio" name="optCondition" value="all"
<?php
if ($optCondition == "all"){
print "checked";
}
?>
because $optCondition is not declared the page throws a notice about
it however if I do the following:
<input type="radio" name="optCondition" value="all"
<?php
$optCondition = "";
if ($optCondition == "all"){
print "checked";
}
?>
the condition is going to get overwritten with an empty string and
spoil my test (I assume). Any Ideas would be appreciated.
I am sorry the first part of this message is a little vague but I hope
someone will pick up what I mean and be able to help.
Thanks,
Eamon.
- Next message: Thibaut: "Re: ask help with php + mysql with salary!!!!!!!!!!!!!!"
- Previous message: Tony P.: "Re: Setting Up MySQL?"
- Next in thread: J.O. Aho: "Re: Use of output buffering and a question about fixing a notice."
- Reply: J.O. Aho: "Re: Use of output buffering and a question about fixing a notice."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|