homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
checkbox sending its own value and value from a hidden field?
is it possible
bantu

5+ Year Member



 
Msg#: 3864727 posted 11:48 pm on Mar 6, 2009 (gmt 0)

hi,
i have a form with a checkboxes on 1st page. when i press submit button, value of those checkboxes (if they are checked)are shown on the 2nd page. those values are names of the selected items. now,i need 1 more value for every checkbox that can be shown on the 2nd page after submit (for example price of selected item, so thet i can calculate total price). is that possible and how? i'm using PHP

thanks

 

coopster

WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3864727 posted 7:36 pm on Mar 7, 2009 (gmt 0)

Welcome to WebmasterWorld, bantu.

Yes, you can carry it through your form as a hidden input field, or in the query string or in a cookie too.

Moby_Dim

10+ Year Member



 
Msg#: 3864727 posted 7:40 pm on Mar 7, 2009 (gmt 0)

You may use javascripting successfully for that purpose. Create onselect or onclick event handlers for your c/boxes where you may assign a value to corresponding hidden field(s). Do not forget to wipe off such values by the same e/handler in the case you've decided to de-check already checked c/box...

bantu

5+ Year Member



 
Msg#: 3864727 posted 4:09 pm on Mar 8, 2009 (gmt 0)

ok, thanks. i did it with hidden field

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved