Показать сообщение отдельно

  #9  
Старый 12.07.2009, 20:30
diGriz
Участник форума
Регистрация: 11.10.2006
Сообщений: 134
С нами: 10305836

Репутация: 235
По умолчанию

mailbrush можно было и так, почти как у него

PHP код:
<?php
$in 
= array ("1""2");
    
$rands array_rand($in2);
    
$out $in[$rands[0]];
    echo 
"<br>".$out;
    
?>
    <form method="post">
    <input type="submit" name="arr[]" value='1'>
    <input type="submit" name="arr[]" value='2'>
    <input type="submit" name="arr[]" value='3'>
    <input type="submit" name="arr[]" value='4'>
    <input type="hidden" name="hid" value="<?=$out?>"/>
    </form>
    <?php 
    
if(isset($_POST['arr']))
    {
       if (
$_POST['arr'][0] == $_POST['hid']) 
       {
           echo 
"genius";
       }
    } 
?>
 
Ответить с цитированием