How to add edit button in content type? I am new to drupal and I was adding a button for editing the data from database.
but when I am adding edit button using add content type then this error message is showing to me.Please help me to guide how to add buttons and relate them to database.
You actually need to add the edit button in a node. well, first you need to get the node ID, create template.php and add this function :

function YOUR-THEME_preprocess_node(&amp;$variables)
{
    if (isset($variables['node'])) 
    {
         $variables['id'] = $variables['node']-&gt;nid;
    }
}


in this way the node id will be saved in the $id variable inside the node template file. if you want to use the default node.tpl.php copy this file from modules/system/node.tpl.php. now add this code where ever you want in the new copied node.tpl.php

&lt;?php
    global $base_url;
?&gt;
&lt;a href="&lt;?php print $base_url;?&gt;/node/&lt;?php print $id;?&gt;/edit"&gt;Edit the Content! &lt;/a&gt;


if you suggest any theme hook (theme the node page) no difference does it make, use the above code, the link always will be 

"&lt;?php print $base_url;?&gt;/node/&lt;?php print $id;?&gt;/edit"


Good luck