jgires Posted May 15, 2010 Share Posted May 15, 2010 hi i am working on a control panel software using a mysql database and i am trying to make a feature where if you check the box it will update the db where private = 0 it should update it to make it 1 if the checkbox is selected heres my script if(isset($_POST['private'])) { $result = mysql_query("UPDATE post SET private = '1' WHERE title = '$_POST[h2]'") or die("There seems to be a problem with the script"); echo "Post was made private"; } hers my html script Private:<input type="checkbox" name="private" value="private"><br /> could you please tell me what im doing wrong? Link to comment https://forums.phpfreaks.com/topic/201875-private-post/ Share on other sites More sharing options...
CodeMaster Posted May 15, 2010 Share Posted May 15, 2010 Can you show us the error you get? And it might help to see the complete code. Link to comment https://forums.phpfreaks.com/topic/201875-private-post/#findComment-1058798 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.