Skorpius

Php Form Processing

Jun 12th, 2022 (edited)
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2.                            
  3.   if($_SERVER['REQUEST_METHOD'] === 'POST'){
  4.  
  5.         if(isset($_POST['submit'])){
  6.      
  7.             try{
  8.      
  9.                 //Code here
  10.                 echo "Hello";
  11.            
  12.             }catch(PDOException $e){
  13.      
  14.                 echo 'Connection error: '.$e->getMessage();
  15.      
  16.              }// end of catch
  17.      
  18.         }
  19.      
  20.     }                                  
  21.                            
  22. ?>
Add Comment
Please, Sign In to add comment