saadlive Posted April 20, 2006 Share Posted April 20, 2006 Hi there, I made a simple blog and I made a public button. I need to make it so that if the button is not checked then it wont show that post.What info do you need from me? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted April 20, 2006 Share Posted April 20, 2006 Non!in your script that processes the entry of the blog you simply need to check the value of the public button - it sounds like you are using a check box.If so you only need to check if the variable has been set (checkboxes and radio buttons if not selected do not post that variable to teh accepting script!)input type=checkbox name=chk id=chkif (isset($_POST['chk])) {...}Now all you need do then is if it is set add a value to the field (assumed `display` in the following query) in you database that can be compaired to see if it should be displayed or not.Once that is complete then your query would in clude...SELECT * FROM blogtable WHERE `display` = 1 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.