/ Published in: PHP
Check to see if HTTP POST variable exists before doing something with it.
Expand |
Embed | Plain Text
$name = $_POST['name']; }
Comments
Subscribe to comments
You need to login to post a comment.

very simple, but a very common piece of code. Handy for copy pasting.
Can also be written as:
if ( isset($POST['name']) ) { $name = $POST['name']; }
for all those who always like to be positive ;)