1
It is possible to make sure that if I do not enter data in a form with
method="get"
, when you go toaction="/minha-url.php"
, if you have not entered data in the previous form, simply nothing will be displayed instead of "Notice: Undefined index", etc...
Part where I make the GET content appear:
<?php echo ($_GET["email"]) ; ?>
When I input the email, it stays: [email protected]
When I don’t enter, it stays: Notice: Undefined index: email in C: xampp htdocs teste.php on line 104
It’s a very simple question, but I couldn’t find solutions, I couldn’t find anything on the Internet to solve this problem.
this is one of the most recurrent subjects. are you sure you searched the internet? http://answall.com/questions/21714/como-resolver-um-notice-undefined-index
– Daniel Omine
http://answall.com/q/87988/4793
– Daniel Omine
Use
isset($_GET)
orisset($_GET["email"])
. Type:<?= isset($_GET["email"]) ? $_GET["email"] : ''>
;– Inkeliz
http://answall.com/q/89960/4793
– Daniel Omine