Okay, the program creates a form where are 3 inputs and user can enter RGB color numbers inside the form and the program prints the dechex of the number and uses the RGB color in the text on the site, I can´t get this working, I think there is a problem with the variable $endcolor, Thx already!
if (!empty($_POST["red"]) && !empty($_POST["green"]) &&
!empty($_POST["blue"]))
{
$red=$_POST["red"];
$green=$_POST["green"];
$blue=$_POST["blue"];
$redvalue = dechex($red);
$greenvalue = dechex($green);
$bluevalue = dechex($blue)."<br>";
echo "#". $redvalue. $greenvalue. $bluevalue;
$endcolor = "#".$redvalue.$greenvalue.$bluevalue;
echo "<p>You chosed <span style=\"color:$endcolor;\">This</span>Color</p>";
}
else
{
?>
<form action="phpharj19.php" method="post">
Insert red(max 255)<br><input type="value" name="red"><br>
Insert green(max 255)<br><input type="value" name="green"><br>
Insert blue(max 255)<br><input type="value" name="blue"><br>
<input type="submit" value="Lähetä">
<br>
<?php
}
?>