anth0ny Posted January 8, 2009 Share Posted January 8, 2009 Hi on my cms page when i go to edit a page i have a tick box for special offer. The edit page doesnt hold the check box value? <input name="specialoffer" class="fields" id="specialField" type="checkbox" value="<?=$specialoffer;?>" /> Does anyone know why this may be? Link to comment https://forums.phpfreaks.com/topic/140012-holding-a-check-box-value/ Share on other sites More sharing options...
dennismonsewicz Posted January 8, 2009 Share Posted January 8, 2009 Hi on my cms page when i go to edit a page i have a tick box for special offer. The edit page doesnt hold the check box value? <input name="specialoffer" class="fields" id="specialField" type="checkbox" value="<?=$specialoffer;?>" /> Does anyone know why this may be? I would change: <input name="specialoffer" class="fields" id="specialField" type="checkbox" value="<?=$specialoffer;?>" /> to <input name="specialoffer" class="fields" id="specialField" type="checkbox" value="<?php echo $specialoffer; ?>" /> Link to comment https://forums.phpfreaks.com/topic/140012-holding-a-check-box-value/#findComment-732531 Share on other sites More sharing options...
PFMaBiSmAd Posted January 8, 2009 Share Posted January 8, 2009 To keep a checkbox checked - http://w3schools.com/tags/att_input_checked.asp Link to comment https://forums.phpfreaks.com/topic/140012-holding-a-check-box-value/#findComment-732536 Share on other sites More sharing options...
anth0ny Posted January 8, 2009 Author Share Posted January 8, 2009 sorry, needs to retrieve the result from the database though Link to comment https://forums.phpfreaks.com/topic/140012-holding-a-check-box-value/#findComment-732543 Share on other sites More sharing options...
dennismonsewicz Posted January 8, 2009 Share Posted January 8, 2009 how is $specialoffer being set? Link to comment https://forums.phpfreaks.com/topic/140012-holding-a-check-box-value/#findComment-732749 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.