[PHP-DB] Form Submittion

2002-05-02 Thread PHP News

I have made function that automaticly inserts/updates the fields in a mysql
database from the $HTTP_POST_VARS variable. So when a user submits a form is
will autimaticly update the database. The problem I am having is that i need
to be able to submit unchecked checkboxes.

Does anyone know how to do this, or any workaround.

Thanks.

--
Cameron Cooke
Software Engineer
Toucan Resolve Ltd
Registered No 3900680
Tel: 01273 422288
Fax: 01273 272227
Email: [EMAIL PROTECTED]



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




Re: [PHP-DB] Form Submittion

2002-05-02 Thread James Treworgy

I have a work-in-progress class to handle update/edit of forms, but my
general strategy for checkboxes has been to include another hidden
field which has a value of 1 so you know that there should be an
accompanying field. e.g.

f_checkboxname is your checkbox
c_checkboxname is your fake field

in the loop where you go through all the  fields, look for antyhing
that starts with f_ or c_ and if you get a c_, look for the
accompanying f_. If it's got a value, then set the checkbox 1, else
set it zero

-- Jamie

Thursday, May 2, 2002, 8:39:12 AM, you wrote:

PN I have made function that automaticly inserts/updates the fields in a mysql
PN database from the $HTTP_POST_VARS variable. So when a user submits a form is
PN will autimaticly update the database. The problem I am having is that i need
PN to be able to submit unchecked checkboxes.

PN Does anyone know how to do this, or any workaround.

PN Thanks.

PN --
PN Cameron Cooke
PN Software Engineer
PN Toucan Resolve Ltd
PN Registered No 3900680
PN Tel: 01273 422288
PN Fax: 01273 272227
PN Email: [EMAIL PROTECTED]






-- 
Best regards,
 Jamesmailto:[EMAIL PROTECTED]


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