HTML form truncation: stops parsing on empty string

This is a discussion on HTML form truncation: stops parsing on empty string within the PHP General forums, part of the PHP Programming Forums category; Hi, everyone, PHP seems to hang up when it finds an HTML text input with a value of either '0' ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2006
polyparadigm@gmail.com
 
Posts: n/a
Default HTML form truncation: stops parsing on empty string

Hi, everyone,

PHP seems to hang up when it finds an HTML text input with a value of
either '0' or ''. Anything that would return "true" when tested with
empty() seems to prevent all of the following inputs from being parsed
into the $_REQUEST string, even PHPSESSID and some hidden inputs that
are hard-coded into the form.

Basically, I'm losing data unless dummy values are filled in. What
gives?

I would like to give users the option of leaving an input blank one
time, and a different input blank the next, so re-ordering the form to
handle truncation due to empty strings really isn't an option.

Default values for the inputs are already being set by querying the
database of existing fields, so it would be trivial to append ' ' to
each. Unfortunately there would still be the possibility of error if a
user deleted the space, and in any event this would be a hack rather
than a real, elegant solution.

Any advice?

Reply With Quote
  #2 (permalink)  
Old 10-17-2006
polyparadigm@gmail.com
 
Posts: n/a
Default Re: HTML form truncation: stops parsing on empty string

It seems this problem has cleared up on its own.

Given what I changed when it improved, it may have been due to the way
I was querying MySQL to generate the input names, although I can't see
how adding single quotes around a variable name was would change the
form parsing behavior.

Particularly mysterious is that the HTML source for the form doesn't
seem to have changed, only the response afterward. This seems magical,
since the HTML source is theoretically the only channel for information
between the form generating script and the form parsing script.

Odd, odd, odd.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0