FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Eregi possible problem
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Eregi possible problem [message #169379 is a reply to message #169362] Wed, 08 September 2010 20:25 Go to previous messageGo to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
On Wed, 8 Sep 2010 08:40:05 -0700 (PDT), GarryJones wrote:
>> That's PHP telling you that your code is sloppy.  Unchecked checkboxes
>> don't get passed with POST/GET operations, so you are in effect doing
>> the same as the following:
>
> I "solved" this today in a different way....
> First I set all values to nej.
> <input name="boksin" type="hidden" value="nej">
> <input name="boksil" type="hidden" value="nej">
> <input name="boktav" type="hidden" value="nej">
> <input name="boklic" type="hidden" value="nej">
> <input name="bokncg" type="hidden" value="nej">
> <input name="bokpap" type="hidden" value="nej">
>
> Then if they are later displayed as checkboxes the value is
> redeclared, if not then the "post" reads from the above. Your answer
> was obviously more professional and correct but isn't the main thing
> to get things working?

Some right answers are better than others. Something involving checking

if (isset($_POST['foo']) && $_POST['foo']="bar") { ...

might be useful.

--
Science is like sex:
sometimes something useful comes out, but that's not why we're doing it.
-- Richard Feynman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Another heredoc question
Next Topic: php filling in listbox value based on db record ??
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 11:12:11 GMT 2024

Total time taken to generate the page: 0.09476 seconds