I found this solution here:
I created a module for give possibility to some users to change the background file from the UI.
In my module:
$vars[‘background’] = “BK2.jpg”;
In my page.tpl.php
<?php print $background;?>
Now how can I modify permanently after this function
file_save_upload(‘upload_item’, $validators, $location, $replace = FILE_EXISTS_REPLACE);
the above variable to change the background?
I tried variable_set() but no luck!