I need some help figuring this out, since I have been using a lot of time on it, and simply can't get my head around it...
I have a row in my table called 'Presets', where I would like to change the value, which is 'Normal' to 'Event'. I would like to do this with the click of a button on my website, as I have already figured out how to change the design, when I manually change it in the DB.
HTML:
<ul class="dropdown-menu">
<li><a href="#" id="presetchange">Event</a></li>
<li><a href="#">#2</a></li>
<li><a href="#">#3</a></li>
</ul>
Jquery:
$("#presetchange").on('click', function() {
$.ajax({
url: "../presethandler.php"
});
});
PHP:
require("connection.php");
mysql_query("UPDATE dashboard SET preset = 'Event' WHERE user_id = '1'");