Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Fala aí pessoal, beleza? Não estou conseguindo criar um cadastro com o mysql, já refiz o bd várias vezes e aparece as mesmas mensagens. Uso o WampServer v 2.5, eis as mensagens: Deprecated: mysql_real_escape_string(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\testesistema\default.php on line 10 Warning: mysql_select_db() expects parameter 2 to be resource, object given in C:\wamp\www\testesistema\default.php on line 58 Warning: mysql_query() expects parameter 2 to be resource, object given in C:\wamp\www\testesistema\default.php on line 59 default.php
<?php require_once('Connections/conexao.php').?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") if (PHP_VERSION < 6) { $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. }
} $editFormAction = $_SERVER['PHP_SELF']. if (isset($_SERVER['QUERY_STRING'])) { $editFormAction.= "?". htmlentities($_SERVER['QUERY_STRING']). } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO curriculo (nome, cpf, endcompleto, cep, cidade, uf, telefones, email, idade, estadocivil, qtdfilhos, objetivo, qualificacoes, formacademica, expprofissional, outinformacoes) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['nome'], "text"), GetSQLValueString($_POST['cpf'], "text"), GetSQLValueString($_POST['endcompleto'], "text"), GetSQLValueString($_POST['cep'], "text"), GetSQLValueString($_POST['cidade'], "text"), GetSQLValueString($_POST['uf'], "text"), GetSQLValueString($_POST['telefones'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['idade'], "text"), GetSQLValueString($_POST['estadocivil'], "text"), GetSQLValueString($_POST['qtdfilhos'], "text"), GetSQLValueString($_POST['objetivo'], "text"), GetSQLValueString($_POST['qualificacoes'], "text"), GetSQLValueString($_POST['formacademica'], "text"), GetSQLValueString($_POST['expprofissional'], "text"), GetSQLValueString($_POST['outinformacoes'], "text")). mysql_select_db("cv", $conexao). $insertGoTo = "sucesso.php". if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo.= (strpos($insertGoTo, '?'))? "&": "?". $insertGoTo.= $_SERVER['QUERY_STRING']. } header(sprintf("Location: %s", $insertGoTo)). }?> Cada cor, corresponde a um erro em específico, que já procurei no google e não encontrei nada. Não sei se é problema de versão do wamp, ou do próprio DW CS5, sei lá! Alguém pode me socorrer? Aguardo respostas!!! []'sCarregando comentários...