Jump to content
Fórum Script Brasil
  • 0

Inserir valores PHP MYSQL


Júnior Gomes
 Share

Question

executo este código,

<?php
$_REQUEST;

$bd_host = "localhost";

$bd_user = "root";

$bd_senha = "";

$bd_nome = "evas";


$conexao = mysqli_connect($bd_host,$bd_user,$bd_senha,$bd_nome) or die(mysql_error());

$select_bd =  mysqli_select_db($conexao,$bd_nome) or die(mysql_error());

var_dump($conexao);


$nome = $_POST['nome'];
$pai = $_POST['pai'];
$mae = $_POST['mae'];
$data = $_POST['dat_nas'];
$RG = $_POST['rg'];
$CPF = $_POST['cpf'];
$titulo = $_POST['te'];
$secao = $_POST['secao'];
$zona = $_POST['zona'];
$nis = $_POST['nis'];

$quer ="use evas;";
mysqli_query($conexao,$quer);


$sql = "INSERT INTO alunos (id_aluno, nome, pai, mae, dat_nas, RG, CPF, TE, zona, secao, nis) VALUES ('','$nome','$pai','$mae','$data','$RG','$CPF','$titulo','$secao','$zona','$nis')";


mysqli_query($conexao,$sql);


?>

e apresenta este erro, 

object(mysqli)[1]
  public 'affected_rows'  
  public 'client_info'  
  public 'client_version'  
  public 'connect_errno'  
  public 'connect_error'  
  public 'errno'  
  public 'error'  
  public 'error_list'  
  public 'field_count'  
  public 'host_info'  
  public 'info'  
  public 'insert_id'  
  public 'server_info'  
  public 'server_version'  
  public 'stat'  
  public 'sqlstate'  
  public 'protocol_version'  
  public 'thread_id'  
  public 'warning_count'  

 

alguém pode ajudar? agradeço  

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

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.6k
    • Total Posts
      646.2k
×
×
  • Create New...