如果数据库的查询或更新成功与否,我想提醒用户..
添加用户.php
<?php
include('sqlconnection.php');
$firstname = $_POST['fname'];
$lastname = $_POST['lname'];
$middlename = $_POST['mname'];
$password = $_POST['pword'];
$username = $_POST['uname'];
$gender = $_POST['gender'];
$utype = $_POST['utype'];
$query = "INSERT INTO user (firstname,lastname,middlename,gender) VALUES ('$firstname','$lastname','$middlename','$gender')";
mysql_query($query);
$result = mysql_query("SELECT id FROM user WHERE firstname = '$firstname'");
$row = mysql_fetch_assoc($result);
mysql_query("INSERT INTO accounts (u_id,username,password,utype) VALUES ('$row["id"]','$username',md5('$password'),$utype);")
?>
我将如何提醒用户?或者我应该用什么来给用户一个弹出消息,说它成功了?