我刚开始学习PHP语言。 我有,
Parse error: syntax error, unexpected ',' in /Applications/XAMPP/xamppfiles/htdocs/testweb/proses_daftar.php on line 7
这是我的proses_daftar.php
<?php
session_start();
include('config/koneksi.php');
if(isset($_POST['daftar']))
{
$name = mysqli_real_escape_string(($con,$_POST['name']));
$username = mysqli_real_escape_string(htmlentities($_POST['username']));
$email = mysqli_reali_escape_string(htmlentities($_POST['email']));
$password = mysql_reali_escape_string(htmlentities($_POST['password']));
$retype_password = mysqli_real_escape_string(htmlentities($_POST['retype_password']));
我的错在哪里?
答案 0 :(得分:-1)
替换:
$name = mysqli_real_escape_string(($con,$_POST['name']));
使用:
$name = mysqli_real_escape_string($con, $_POST['name']);
然后将$con
作为mysqli_real_escape_string
的所有其他调用中的第一个参数。