craigeves Posted July 28, 2008 Share Posted July 28, 2008 If in my HTML code i had a form with a checkbox on it and on another page i have some text that i only want shown if the checkbox has been ticked in the MySQL database, how do i go about doing that? Many thanks C Link to comment https://forums.phpfreaks.com/topic/116982-tick-boxes-show-content-mysql/ Share on other sites More sharing options...
Xurion Posted July 28, 2008 Share Posted July 28, 2008 I assume you are using PHP. if(!empty($_POST['your_checkbox'])){ $result = mysql_query("SELECT yourtext FROM yourtable"); $row = mysql_fetch_assoc($result); echo $row['yourtext']; } Link to comment https://forums.phpfreaks.com/topic/116982-tick-boxes-show-content-mysql/#findComment-601614 Share on other sites More sharing options...
craigeves Posted July 28, 2008 Author Share Posted July 28, 2008 Thanks, i'll give that a try... and yes, i am using PHP. Thanks again Craig Link to comment https://forums.phpfreaks.com/topic/116982-tick-boxes-show-content-mysql/#findComment-601617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.