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 | - | // $cont_red= '0'; |
31 | + | |
32 | - | // $cont_green ='0'; |
32 | + | |
33 | - | // $cont_blue = '0'; |
33 | + | |
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 | - | |
58 | + | |
59 | - | /* print $cont_alto ."<br/>" ; |
59 | + | |
60 | - | print "red " . $red . " "; |
60 | + | |
61 | - | print "gren " . $green . " "; |
61 | + | |
62 | - | print "blue " . $blue . "<br/>"; */ |
62 | + | |
63 | ||
64 | ||
65 | ?> | |
66 | ||
67 | - | |
67 | + | |
68 | - | |
68 | + | |
69 | - | |
69 | + | |
70 | - | |
70 | + | |
71 | - | // echo ("<b>contador" . $_POST['contador'] . "</b><br/>"); |
71 | + | |
72 | - | // echo ("<b>red" . ($red) . "</b><br/>"); |
72 | + | |
73 | - | // echo ("<b>green" . ($green) . "</b><br/>"); |
73 | + | |
74 | - | // echo ("<b>blue" . ($blue) . "</b><br/>"); |
74 | + |