PHP - Superglobals and Web Context
What is wrong with this PHP code to get a POST value?
<?php
if ($_POST['submit']) {
echo $_POST['email'];
}
?><?php
if ($_POST['submit']) {
echo $_POST['email'];
}
?>$_POST['submit'] without checking if it exists can cause an undefined index error.isset($_POST['submit']) to safely check if the key exists before using it.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions