liam1412 Posted January 30, 2007 Share Posted January 30, 2007 Thsi si the code for my checkbox[code]<input class="input" type="checkbox" name="default" value="default" />[/code]and here is my bit of code which should change the variable default from 0 to 1 if the box is ticked. [code]if(isset($_POST['default'])){if($default == 'default'){ $default = '1'; }}[/code] Link to comment https://forums.phpfreaks.com/topic/36353-solved-checkbox-into-php-help-please/ Share on other sites More sharing options...
ninja Posted January 30, 2007 Share Posted January 30, 2007 so what's the problem, other than I think you meant:if($_POST['default'] == 'default'){ Link to comment https://forums.phpfreaks.com/topic/36353-solved-checkbox-into-php-help-please/#findComment-172846 Share on other sites More sharing options...
liam1412 Posted January 30, 2007 Author Share Posted January 30, 2007 Sorry. I did write my problem but cut it to move it. must not have pasted it in. But your right that was what is worng. without even knowing.ha haCheers Ninja Link to comment https://forums.phpfreaks.com/topic/36353-solved-checkbox-into-php-help-please/#findComment-172852 Share on other sites More sharing options...
ninja Posted January 30, 2007 Share Posted January 30, 2007 That's why I am ninja. Link to comment https://forums.phpfreaks.com/topic/36353-solved-checkbox-into-php-help-please/#findComment-172857 Share on other sites More sharing options...
boo_lolly Posted January 30, 2007 Share Posted January 30, 2007 [quote author=ninja link=topic=124723.msg517177#msg517177 date=1170176603]That's why I am ninja. [/quote]hahahahahaha good call bud. Link to comment https://forums.phpfreaks.com/topic/36353-solved-checkbox-into-php-help-please/#findComment-172861 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.