插入时mysqli_real_escape_string echo的php代码

时间:2017-10-21 18:40:40

标签: php

当我尝试使用msqli_real_escape_string将数据插入数据库时​​,php代码正在回复提交,就像这样 这是我的代码

<?php 
  include_once 'db.php'; 

  $first= mysqli_real_escape_string($conn, $_POST['first']);
   $last=  mysqli_real_escape_string($conn, $_POST['last']);
    $email=  mysqli_real_escape_string($conn, $_POST['email']);
     $uid=  mysqli_real_escape_string($conn, $_POST['uid']);
      $pwd=  mysqli_real_escape_string($conn, $_POST['pwd']);


$sql = "INSERT INTO users (user_first, user_last, user_email, user_uid, user_pwd) VALUES         ('$first', '$last', '$email', '$uid', '$pwd');";
$results = mysqli_query($conn, $sql);

header("location:../index.php?signup=succes");

     ?>

我做错了什么?

0 个答案:

没有答案