Using UPDATE for form input
===

How do you use UPDATE for form input?  All the examples I've found online for either UPDATE or On Duplicate Key UPDATE are with counters or predetermined values.  Ideally I’d like to use On Duplicate Key UPDATE, but advice on either would method would be most appreciated.

I’ve included what I’ve tried below, along with the error message I receive.

'user_id' is the primary key in all of the tables and is a foreign key in all but the account table.
 
    <?php
    session_start();  
    require_once('config.php');	
    require_once('open_db.php');	 
      
    $setlist='';
    foreach ($_POST as $key=>$value)
    {
    $setlist.=$key .'=\''.$value.'\',';
    }
    $setlist=substr($setlist, 0, -1);
    $user_id=$_SESSION['SESS_USER_ID'];  
    $sql='UPDATE style_test SET ;.$setlist.' WHERE user_id='.$user_id;
    if (!mysql_query($sql,$con))
    {
    die('Error: ' . mysql_error());
    }  		  
    ?>

Error message
Parse error: syntax error, unexpected T_STRING on line 19
Line 19 is  - 
$sql='UPDATE style_test SET ;.$setlist.' WHERE user_id='.$user_id;