NYCPHP Meetup

NYPHP.org

[nycphp-talk] another interesting parameter of this survey

gadhra bfeqx44002 at sneakemail.com
Wed May 14 16:46:33 EDT 2003


You got it - if they're checkboxes (like you have), they should be:
ynBrush
ynVacuum

If you're interested in doing whether or not something's surface is 
clean, I would do:
ynSurfaceClean

and in your code write:

if ($_POST['brush'] || $_POST['vacuum']) {
    $sql = "update tbl set ynSurfaceClean = 1";
} else {
   $sql = "update tbl set ynSurfaceClean = 0";
}

(commiting it to the database, of course)

+gadhra+




Joshua S. Freeman jfreeman-at-amnh.org |NY PHP| wrote:

>So.. there's an area on the form:
>
>Surface clean:  [ ] brush  [ ] vacuum  ([ ] == checkbox)
>
>so.. for any record/specimen, it will either be:
>
>1) no brush no vacuum
>2) yes brush no vacuum
>3) yes brush yes vacuum
>4) no brush yes vacuum
>
>so, in the database, do i just make these two different yn field?  ynbrush
>and ynvacuum, tinyint(1)... ?
>
>even though they're both associated with the notion of 'surface clean' ?
>
>J.
>
>
>
>--- Unsubscribe at http://nyphp.org/list/ ---
>
>
>
>
>
>  
>

-- 
+gadhra+(/s)
*********************
XXXXXXXXXXXXXXXXX
And seize the metropolis;
It's you it's built on





More information about the talk mailing list