i want to manipulate a joomla component for my site.
component has no ability to do what i want.
i create a db row for component, for every new users.
but i coudn't resolve parent id column to insert the correct value.
i have to login to panel and open that category id, and just click "save and close" button for every new users.
it is a manuel solution.
but can i do it by running "file_get_contents".
like this:
$url = "/index.php?option=com_joomgallery&controller=categories&task=edit&cid=59";
$postdata=http_build_query(array("usr" => "xxxx", "pass" => "xxx", "cid" => "59", "javascript" => ""Joomla.submitbutton('save')""));
$opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata));
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
source code part:
<li class="button" id="toolbar-save">
<a href="#" onclick="Joomla.submitbutton('save')" class="toolbar">
<span class="icon-32-save">
</span>
Save & Close
</a>
</li>
could i explain the problem clearly???
categories.php