<title>Student Registration</title>
Please write the information complete"; Echo"
"; exit;} $query = "SELECT * from $student _infor where no= ' $xuehao ' and name= ' $name '"; mysql_query ("Set names ' GB2312 '"); $result = mysql_query ($query); $row =mysql_fetch_array ($result); if ($row ==0) {echo "You entered the wrong information, not a computer college graduate!
"; echo "
"; Exit;} $query = "SELECT * from $student _table where xuehao= ' $xuehao '"; mysql_query ("Set names ' GB2312 '"); $result =mysql_query ($ query); $row =mysql_fetch_array ($result); if ($row!=0) {echo "This school number has been registered, please re-fill!
"; echo "
"; Exit;} if ($password! = $password 1) {echo "The password entered is inconsistent, please re-enter!
"; echo "
"; Exit } $query = "INSERT INTO $student _table values (' $xuehao ', ' $name ', ' $sex ', ' $class ', ' $password ', ' $love ', ' $telephone ', ' $ Reward ', ') "; mysql_query ("Set names ' GB2312 '"); $result =mysql_query ($query); if ($result ==true) {echo]Registration Successful!
"; echo "
"; Exit }?>
Reply to discussion (solution)
This is the display result, show 2 seconds and then jump back to the registration page, where the error?
$xuehao ... Where are these variables coming from?
$xuehao ... Where are these variables coming from? This is another PHP page for me
Student Registration Page
That's $_post[' Xuehao '.
That's $_post[' Xuehao ', what do you mean?
Error tip: $xuehao undefined!!!
register.php
Extract ($_post); Add this sentence.
if ($xuehao = = "" | | $name = = "" | | $class = = "" | | $password = = "" | | $password 1== "" | | $telephone = = "")
Is it possible to understand this?
$heihao defined variables:
$_get[' Xuehao ' is passed from another page.
I'm a rookie too, just touching
register.php
Extract ($_post); Add this sentence.
if ($xuehao = = "" | | $name = = "" | | $class = = "" | | $password = = "" | | $password 1== "" | | $telephone = = "") Thanks, problem solved!