<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>
set_error_handler(function($errno, $error){
if (!str_starts_with($error, 'Undefined array key')){
return false; //default error handler.
}else{
trigger_error($error, E_USER_NOTICE);
return true;
}
}, E_WARNING);
then
ini_set ("error_reporting", E_ALL & ~E_NOTICE & ~E_USER_NOTICE)
<?php if(isset($_GET['fname']) && isset($_GET['age'])): ?> //isset is important
<br/>
Your name is <?php echo $_GET["fname"]; ?>
<br/>
Your age is <?php echo $_GET["age"]; ?>
<?php endif; ?>
<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>
<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>
<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>
<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>
<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>
<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>
<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>
<?php if(isset($_GET['name'])): ?>
Your name is <?php echo $_GET["name"]; ?>
<?php endif; ?>