Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
- <meta name="author" content="MESMERiZE" />
- <title>Untitled 2</title>
- </head>
- <body>
- <form action="cor.php" method="post">
- <li><b>contador... de cores</li>
- <input type="text" name="contador" id="contador" value="10"/>
- <li>Red escolha de 0 a 255<br /><br /></li>
- <input type="text" name="red" id="red" value="10"/>
- <li>Green escolha de 0 a 255<br /></li>
- <input type="text" name="green" id="green" value="10"/>
- <li>Blue escolha de 0 a 255</b><br /></li>
- <input type="text" name="blue" id="blue" value="10"/>
- <input type="submit" name="manda vê"/>
- </form>
- <?php
- $contador = $_POST['contador'];
- $red = $_POST['red'];
- $green = $_POST['green'];
- $blue = $_POST['blue'];
- // $cont_red= '0';
- // $cont_green ='0';
- // $cont_blue = '0';
- for ($cont_alto= 0;$cont_alto < $contador;$cont_alto++)
- {
- if($red < 255)
- {
- $red= ($red + 1);
- }
- if ($red == 255)
- {
- if($green < 255)
- {
- $green = ($green +1);
- }
- }
- if ($green == 255)
- {
- if($blue < 255)
- {
- $blue = ($blue + 1);
- }
- }
- print "<b style='color:rgb(<?php echo $red ?>, <?php echo $green ?>, <?php echo $blue ?>);'>o</b>" ;
- /* print $cont_alto ."<br/>" ;
- print "red " . $red . " ";
- print "gren " . $green . " ";
- print "blue " . $blue . "<br/>"; */
- }
- // echo ("<b>contador" . $_POST['contador'] . "</b><br/>");
- // echo ("<b>red" . ($red) . "</b><br/>");
- // echo ("<b>green" . ($green) . "</b><br/>");
- // echo ("<b>blue" . ($blue) . "</b><br/>");
- // echo ("<b>O valor digitado foi: ".$_POST['red']."<br><br>");
- ?>
- <br />
- <b style='color:rgb(<?php echo $red ?>, <?php echo $green ?>, <?php echo $blue ?>);'>o000</b>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement