/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function display_post_get() { if ($_POST) { echo "Displaying POST Variables: <br> \n"; echo "<table border=1> \n"; echo " <tr> \n"; echo " <td><b>result_name </b></td> \n "; echo " <td><b>result_val </b></td> \n "; echo " </tr> \n"; echo " <tr> \n"; echo " <td> $result_nme </td> \n"; echo " <td> $result_val </td> \n"; echo " </tr> \n"; } echo "</table> \n"; } if ($_GET) { echo "Displaying GET Variables: <br> \n"; echo "<table border=1> \n"; echo " <tr> \n"; echo " <td><b>result_name </b></td> \n "; echo " <td><b>result_val </b></td> \n "; echo " </tr> \n"; echo " <tr> \n"; echo " <td> $result_nme </td> \n"; echo " <td> $result_val </td> \n"; echo " </tr> \n"; } echo "</table> \n"; } } // End of display_post_get