<?php
include_once ('connection.php');
include_once ('session.php');
if(isset($_POST['submit']))
{
$title = $_POST['title'];
$content = $_POST['content'];
$metatitle = $_POST['metatitle'];
$metadescription = $_POST['metadescription'];
$metarobots = $_POST['metarobots'];
$metatags = $_POST['metatags'];
$categoryname = $_POST['categoryname'];
if(empty($title) || empty($content))
{
echo 'A valid title and some content is required to ceate a post';
}
elseif(empty ($categoryname))
{
$category = 'Uncategorized';
}
else
{
$category = implode(',',$categoryname);
$sql = mysql_query("UPDATE posts SET title = '$title', description = '$content', categories = '$category',
post_meta = '$metatags', post_robots = '$metarobots', meta_title = '$metatitle',
meta_description = '$metadescription' WHERE id = '$getid'") or die(mysql_error());
$affeced_rows = mysql_affected_rows();
if($affeced_rows == 1)
{
}
else
{
}
}
}
?>
Notice: Undefined variable: getid in C:\wamp\www\cms\admin\scripts\create-posts.php on line 34
Call Stack
hello guys i got this error when i try to post into my database can any one help me out please ??