PHP Check for HTTP POST variables


/ Published in: PHP
Save to your folder(s)

Check to see if HTTP POST variable exists before doing something with it.


Copy this code and paste it in your HTML
  1. if ( !empty($_POST['name']) ) {
  2. $name = $_POST['name'];
  3. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.