Har et lille problem, jeg ikke kan se løsningen på. En der kan hjælpe ?
Denne kode:
<?php
include '../script/connect.php';
$host = stripslashes($host);
$user = stripslashes($user);
$pass = stripslashes($pass);
$table = stripslashes($table);
$table2 = stripslashes($table2);
$table3 = stripslashes($table3);
$table4 = stripslashes($table4);
$con = mysql_connect ("$host","$user","$pass");
if(!isset($con))
{
die('Kan ikke oprette forbindelse til Severen');
}
else
{
mysql_select_db("$db" , $con);
}
$up="";
$up_sep="";
$del="";
$del_sep="";
foreach($_POST['besked'] as $id=>$value){
if($value=="godkend")
{
$up.=$up_sep.'id='.$id;
$up_sep=" OR ";
}
else if($value=="slet")
{
$del.=$del_sep.'id='.$id;
$del_sep=" OR ";
}
mysql_query("UPDATE ".$table2." SET tjek=1 WHERE ".$up);
mysql_query("DELETE FROM ".$table2." WHERE ".$del);
?>
Kommer med fejlen:
Parse error: syntax error, unexpected $end in godkend_slet.php on line 44