i resolved the error but <form method=”get” id=”form1″ <?php if(isset($_GET[$cookie_name])) {echo ” style=’display: none'”; } ?>>
<input type=”submit” name=”on” value=”on”>
<input type=”submit” name=”off” value=”off”>
</form>
<?php
$cookie_name = “user”;
$cookie_value = “user2″;
if(isset($_GET[‘on’])) {
onFunc();
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), “/”);
}
if(isset($_GET[‘off’])) {
offFunc();
}
function onFunc() {
global $current_user;
get_currentuserinfo();
if(user_can($current_user ,”7eme”)) {
// Remove role
$current_user->remove_role( “7eme” );
// Add role
$current_user->add_role( “contributor” );
echo “..votre niveau scolaire maintenant est 8ème année de base”;
}
}
function offFunc(){
echo “Bonne chance dans le prémiére fois”;
}?> ,
then when i click to the button on , error display like this
Warning: Division by zero in C:\xampp\htdocs\wptest\wp-content\plugins\php-code-widget\execphp.php(27) : eval()’d code on line 12
// so please can you tell me what i should modify to the methode setcoockie for make that error resolve thanks and sorry for any disturbing ??