This will be a very stupid question but I'm a newbie in programming and I just can't figure it out. What I want to do is make a color mixer in php. User can specify RGB values and then color should appear.
I have this:
<html>
<head>
<title>
RGB
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form method="get">
<center>
<h3>
RGB
</h3>
</center>
<br>
<h5>
Red
</h5>
<input type="range" name="red" min="0" max="255">
<h5>
Green
</h5>
<input type="range" name="green" min="0" max="255">
<h5>
Blue
</h5>
<input type="range" name="blue" min="0" max="255">
<br>
<input type="submit" value="submit">
<br>
<br>
<?php $red=$ _GET[ "red"]; $green=$ _GET[ "blue"]; $blue=$ _GET[ "green"]; function rgb2hex($red,$blue,$green) { return '#' . sprintf( '%02x', $red) . sprintf( '%02x', $blue) . sprintf( '%02x', $green); } rgb2hex($red,$blue,$green); ?>
</form>
</body>
</html>
But I keep getting info about undefined indexes and I don't know how to fix it.