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 Quote Link to comment 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']; } Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.