When debugging a program, it is very strange to find that the post value is null in some places. first look at the following code 1? Php2if ($ _ POST [submit] Add) {3if ($ _ POST [type] movie $ _ POST [movie_type]) {4 header (Location: form4.php ); 5} 6} 7? 8 h
When debugging a program, it is very strange to find that the post value is null in some places. first look at the following code 1? Php 2 if ($ _ POST ['submit '] = 'add ') {3 if ($ _ POST ['type'] = 'movie '$ _ POST ['movie _ type'] = '') {4 header ('location: form4.php '); 5} 6} 7? 8 h
When debugging a program, it is very strange. The value passed by post is null in some places. first look at the following code.
1
8 9 10 Multipurpose Form11 12 13
18 56
Searching for '.$_POST["name"].'...';61 }62 63 if(isset($_POST['debug'])){64 echo '';65 print_r($_POST);66 echo '
';67 }68 ?>69 70
In row 3, the information is output based on the value passed on the previous page. However, even if the passed value is movie, the desired value is not output, I have added echo ($ _ POST ['type']) in many places. This statement can output movie at the top of the Code, the output in the second row is still available, that is, there is no value under the third row. Here you may also find an error. if ($ _ POST ['type'] = 'movi ', this sentence was originally a judgment statement, and the result was written with an equal sign instead of a value assignment statement. A Beginner's mistake !!!!!!
The correct statement should be if ($ _ POST ['type'] = 'movi' & $ _ POST ['movie _ type'] = '')