Re: [PHP] empty and isset

2003-02-06 Thread Mike . Kent

Actually, I believe it's not a matter of the input being set, but the fact
that isset() returns true on an empty variable.



   

  Jason Wong   

  php-general@gremTo:   [EMAIL PROTECTED] 

  lins.bizcc: 

   Subject:  Re: [PHP] empty and isset 

  02/06/2003 12:31 

  AM   

  Please respond to

  php-general  

   

   





On Thursday 06 February 2003 13:20, Bryan Lipscy wrote:
 Env:  Slackware 8.1, Apache 1.3.27, PHP 4.3.0
 Bugs: None found for these issues.

 I am running to this same problem.  The isset() function appears to have
 problems with the empty text value. The empty() function sees the value
 of $_POST['q1'] as expected.

 So why is both isset() and empty() returning true on q1?

input of type text are set regardless of whether you have entered
anything.
Thus isset() returns true.

--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Have you noticed that all you need to grow healthy, vigorous grass is a
crack in your sidewalk?
*/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] empty and isset

2003-02-06 Thread Mike . Kent

Thanks for clearing that up. So input of type text does a set, which makes
isset() true, but isset() does not return true if $var is merely empty.



   

  Jason Wong   

  php-general@gremTo:   [EMAIL PROTECTED] 

  lins.bizcc: 

   Subject:  Re: [PHP] empty and isset 

  02/06/2003 11:28 

  AM   

  Please respond to

  php-general  

   

   





On Thursday 06 February 2003 22:50, [EMAIL PROTECTED] wrote:

  input of type text are set regardless of whether you have entered
  anything.
  Thus isset() returns true.

 Actually, I believe it's not a matter of the input being set, but the
fact
 that isset() returns true on an empty variable.

Try this:

?php

if (isset($doo)) {
  print '$doo is set'; // does not get printed
}

if (empty($doo)) {
  print '$doo is empty'; // gets printed
}

?

--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
The solution to a problem changes the nature of the problem.
 -- Peer
*/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] best way to save form data on user side

2003-01-28 Thread Mike . Kent

I agree on leveraging your position to guide this thing. Here you've added
the requirement of being able to revisit the data in a year.

Why not simply have them fill out the form, put it in the database and then
use another page with queries to draw the data into a similar template and
change it as needed? Simple forms should handle this just fine, and you can
require passwords to the data.

As far as filling it out online, let them pull up the form, fill it out and
reconnect, then press submit.

Wouldn't this cover what you want?



   

  Petre Agenbag

  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]  

  za  cc:   [EMAIL PROTECTED] 

   Subject:  Re: [PHP] best way to save 
form data on user side 
  01/28/2003 03:17 

  PM   

   

   





Hi Chris

On Tue, 2003-01-28 at 22:09, Chris Shiflett wrote:
 --- Petre Agenbag [EMAIL PROTECTED] wrote:
  I have a rather annoying problem regarding forms.
  I have built an app that allows the users to fill
  in a rather large form (much like a claim form)
  and then have the data pumped into a mysql db.
  The problem is: the users want to be able to
  save their forms on their systems as a)
  backup/proof that they have filled it in and b)
  for their records for future use and c) the hope
  is that it would also allow for a reliable method
  to complete the form off-line and then submit it
  when online again.

 Well, this sounds like a bad idea in general, but if you
 have no choice in the matter, I suppose cookies can fulfill
 the need.

 Anything you implement like this is going to lessen the
 security of the data, because rather than the client
 sending it to you once, you are going to expose it over the
 Internet several times. If this risk is acceptable for
 whatever reason, then cookies are probably no less secure
 for this data than anything else.

 Normally, I would highly recommend *not* storing client
 data on cookies, because that opens you up to several types
 of attacks, but you can accomplish what you want to do with
 this method. Only punish those who want this feature by
 setting these cookies only for those who choose to save
 this data locally. You could help the situation by
 encrypting the data in your cookies, so that only
 presentation attacks are a concern, but your users wouldn't
 be able to easily look at their data as verification of
 anything.

 My recommendation is to leverage your position as the
 technical expert to advise a more proper solution, one that
 you agree to, not them. They should not be consulted
 regarding application design unless they have experience
 with it. Rather, they should be describing their needs and
 let you (or the technical lead / project manager) do the
 technical design.
This is exactly what I'm looking to do; but my problem remains: I don't
know what the best solution is.
The problem is clear: the users actually need an electronic copy of the
data they submit; they must revisit certain issues annually, and would
need to access the data they submitted the previous year; either for
review purposes, or to make the new submission a speedy matter of simply
changing the details that are different from last year.
It's much like a normal office scenario: each person works on Word docs
that need to be shared with others, yet needs to be editable and must be
saved etc, BUT the difference here is that the data of all the
collective sources must be entered into a central db. So the non
technical solution would be for the users to do the forms in word,
then fax it to the central office, where you have a temp type the data
into the db... we can't have that now...
Any ideas?

PS, I don't think cookies are going to do this. Remember, the user needs
to be able to access and re-submit the form at any stage.

 Good luck to you.

 Chris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: