I have the following code behind the on submit button. This works the value that the user has selected from a list box gets updated But a new blank record is being added as well each time the form gets submitted?? Thanks for any help on this.
<?php
$userid = $_POST['select_5'];
$db =& JFactory::getDBO();
$query = sprintf("UPDATE jos_eventlist_events SET frontpageimage = 'astring' WHERE id = $userid");
$db->setQuery($query);
$db->query();
?>