Jump to content

private post


jgires

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.