Just been able to try the changes you suggested. they seem to be working well. Many thanks
thanks for that, i can’t test it for a few days as i have no home internet until my ISP fixes it. i will let you know how i get on.
here are the functions that activate and deactivate the plugin.
register_activation_hook(__File__, array('WP_download_manager', 'activate'));
register_deactivation_hook(__File__, array('WP_download_manager', 'deactivate'));
//add actions for the types of pages to display
add_action('admin_menu', 'WP_download_manager_admin');
function activate()
{
//stuff plugin should do on activation goes here
$data = array('title' => "WPDM_option");
if ( ! get_option('WPDM_option'))
{ add_option('WPDM_option' , $data); }
else
{ update_option('WPDM_option' , $data); }
}
function deactivate()
{
//deactivation commands go here
delete_option('WPDM_option');
}