There was a sentence in the last program:
$exec="insert into info (ename,pcname) values ('".$_POST["ename"]."','".$_POST["pcname"]."')";
Explain the meaning of this sentence. The syntax for SQL insertion records is:
insert into Table name (field name 1, field name 2,…) values ("The value of field 1", "The value of field 2",…)
The previous program was based on this syntax. It should be noted that I put quotes in the values in the values brackets, because the corresponding field type is varchar. If the corresponding field type is int or something, then the quotes should be removed! Be sure to pay attention.