Jump to content
Fórum Script Brasil
  • 0

Problemas com o WampServer


Douglas Goulart
 Share

Question

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);
$Result1 = mysql_query($insertSQL, $conexao) or die(mysql_error());

$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!!!

[]'s

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.8k
    • Total Posts
      646.6k
×
×
  • Create New...