View difference between Paste ID: rVCUNrM4 and 5t9TFXnc
SHOW: | | - or go back to the newest paste.
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
4
<head>
5
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
6
	<meta name="author" content="MESMERiZE" />
7
8
	<title>Untitled 2</title>
9
</head>
10
11
<body>
12
13
<form action="cor.php" method="post">
14
15
<li><b>contador... de cores</li>
16
<input type="text" name="contador" id="contador" value="10"/>
17
18
<li>Red escolha de 0 a 255<br /><br /></li>
19
<input type="text" name="red" id="red" value="10"/>
20
21
<li>Green escolha de 0 a 255<br /></li>
22
<input type="text" name="green" id="green" value="10"/>
23
24
<li>Blue escolha de 0 a 255</b><br /></li>
25
<input type="text" name="blue" id="blue" value="10"/>
26
27
<input type="submit" name="manda vĂȘ"/>
28
</form>
29
30
31
<?php
32
  $contador = $_POST['contador'];
33
  $red = $_POST['red'];
34
  $green = $_POST['green'];
35
  $blue = $_POST['blue'];
36
  
37
  
38
39
  for ($cont_alto= 0;$cont_alto < $contador;$cont_alto++)
40
  {
41
    if($red < 255)
42
    {
43
        $red= ($red + 1);
44
    }
45
    if ($red == 255)
46
    {
47
        if($green < 255)
48
        {
49
            $green = ($green +1);
50
        }
51
    }
52
    if ($green == 255)
53
    {
54
        if($blue < 255)
55
        {
56
            $blue = ($blue + 1);
57
        }
58
    }
59
  print "<b style='color:rgb(<?php echo $red ?>, <?php echo $green ?>, <?php echo $blue ?>);'>o</b>" ;
60
61
  
62
  }
63
    
64
65
?>
66
67-
<br />
67+
68
69-
<b style='color:rgb(<?php echo $red ?>, <?php echo $green ?>, <?php echo $blue ?>);'>o000</b>
69+
70
</body>
71
</html>