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

Home » Imported messages » comp.lang.php » Not understanding HTML form
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Not understanding HTML form [message #169432 is a reply to message #169429] Sun, 12 September 2010 18:24 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 9/12/2010 2:06 PM, MikeB wrote:
> I have a question about form submission in PHP (Perhaps more a HTML
> question, but then I don't know).
>
> Please look at the attached sample code. It is a mish-mash of things,
> but this is what I want to know:
>
> When the form initially displays, since the "action" field from the
> form is not set, the PHP code performs the "else" part of the PHP
> code.
>
> Then when I type something into the "action' field, the isset test
> evaluates to true and the "if" portion is executed. However the value
> of the action field is not carried over, since the form does not have
> a "value" clause for that input field.
>
> However, on a 3rd iteration, without typing anything into any field,
> the isset still evaluates to true, although the $_POST variable for
> "action' shows a null field. How can I then recognize that that field
> is in fact not set? or is it set with nulls or what is going on here?
>

A variable containing an empty string (i.e. '') is still set. It is not
a "null field" - it is a string containing no characters.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: Session Cache
Goto Forum:
  

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

Current Time: Sat Nov 23 16:47:38 GMT 2024

Total time taken to generate the page: 0.08901 seconds