What error messages do you get? What is 'id'? Do you really have the data stored in more than one table? If 'id' is defined, and you're updating one table, then you could probably use a query something like:
$sql2 = "UPDATE my_table SET vote1 = $vote1 WHERE id = $id";
(Note that's "$id", not "&id" as you used in an earlier thread.)
BTW, it looks like you could shorten this:
if (isset($_POST['newvote'])) {
switch ($_POST['newvote']) {
case 1:
$vote1++;
break;
case 2:
$vote1++;
$vote1++;
break;
case 3:
$vote1++;
$vote1++;
$vote1++;
break;
case 4:
$vote1++;
$vote1++;
$vote1++;
$vote1++;
break;
case 5:
$vote1++;
$vote1++;
$vote1++;
$vote1++;
$vote1++;
break;
}
}
to this:
if (isset($_POST['newvote'])) {
$vote1 += $_POST['newvote']
}