<form action="actions/add_cat.php" method="post" id="rtf" name="">
<input type="text" name="cat_title" id="cat_title" required="required" placeholder="Category Title"/>
<br /><br />
<button type="button" onclick="button_click('#d31b26');" value="d31b26" name="cat_color"><div class="redSelect"></div></button>
<button type="button" onclick="button_click('#f9c04c');" name="cat_color" value="#f9c04c"><div class="yellowSelect"></div></button>
<button type="button" onclick="button_click('#72bce9');" name="cat_color" value="#72bce9"><div class="blueSelect"></div></button>
<button type="button" onclick="button_click('#ec9292');" name="cat_color" value="#ec9292"><div class="pinkSelect"></div></button>
<button type="button" onclick="button_click('#b7d04e');" name="cat_color" value="#b7d04e"><div class="greenSelect"></div></button>
<div class="indexBox">
<div class="indexBoxHeader" id="box">
<i class="fa fa-question-circle" style="font-size: 2em;"></i></div>
<div class="indexBoxFooter">
<div class='printchatbox' id='printchatbox'></div>
</div>
</div>
<br><br>
<input onclick="formsubmit()" type="submit" value="Create Category" name="submit"/>
</form>
If i test using a text input and using the cat_color name it will post that entry but when using the above it does not seem to to take the item I am selecting?
Here is the post query incase you need to see it:
$sql = "INSERT INTO cat_list (cat_title, cat_color) VALUES ('".$_POST["cat_title"]."', '".$_POST["cat_color"]."')";