<?php
if(trim($_POST['password']) != trim($_POST['repassword'])){
exit ("兩次使用的密碼不一致,請返回上一頁");
}
# $username = trim($_POST['username'] );
$password = md5(trim($_POST['password']));
$conn = mysqli_connect('localhost ','root','root','informationtest','3306');
if(mysqli_error($conn)){
mysqli_error($conn);
exit;
}
mysqli_select_db($conn,'my_my');
# mysqli_set_charset($conn, 'utf8');
insert into informationtest (id,name,password,) value('','$username','$password');
?>
你是直接存取了那個文件,而不是透過伺服器存取的
那你要看html 是不是沒有name