I have used this code on an autosuggest script to split the CSV created into 3 values in an array as such:
<?php if($_POST['category_submit']){ ?>
<script type="text/javascript">
$(document).ready(function() {
var arr = $(".as-values").val().split(",");
var category_1=arr[0];
var category_2=arr[1];
var category_3=arr[2];
});
</script>
<?php } ?>
I now want to add the 3 values within the 3 'var' into the mysql database. What would be the steps necessary to do so?
Many thanks in advanced. Ben.