this is my whole code, i have done what you said but it keeps doing the same error.
<?php require_once('../Connections/museu.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
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;
}
return $theValue;
}
}
if (!empty($_POST['Password'])) {
if ($_POST['Password'] != $_POST['Confirmacao_da_password']) {
$errors[] = '<font color="red">The 2 passwords you have entered do not match.</font>';
} else {
$password = $_POST['Password'];
}
} else {
$errors[] = '<font color="red">Please provide a password.</font>';
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
unset($_POST['MM_insert']);
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO login (nome, Apelido, datadenascimento, loginpassword, confirmacaodepassword, loginemail, levellevel ) VALUES (1, %s, %s, %s, %s, %s, 2)",
GetSQLValueString($_POST['nome:'], "text"),
GetSQLValueString($_POST['Apelido:'], "text"),
GetSQLValueString($_POST['Data_de_Nascimento:'], "date"),
GetSQLValueString($_POST['Password'], "text"),
GetSQLValueString($_POST['Confirmacao_da_password'], "text"),
GetSQLValueString($_POST['Email'], "text"));
}
mysql_select_db($database_museu, $museu);
$Result1 = mysql_query($insertSQL, $museu) or die(mysql_error());
$insertGoTo = "login.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
mysql_select_db($database_museu, $museu);
$query_Recordset1 = "SELECT * FROM Login";
$Recordset1 = mysql_query($query_Recordset1, $museu) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>