Reply to begeiste:
In your switch statement, there is one case that you did not 'break'. That is the only reason for your problem that I could find, however I'm only a beginner.
Fixed switch statment:
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
break;
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
Edit: Just a question, why is require_once('../Connections/filmmaker.php'); in a different PHP block? Just wondering.