fork download
  1. <?php
  2. $names=array("Fred", "Rob", "Lisa");
  3. if($_POST["submit"]){
  4. if($_POST["name"]){
  5. foreach($names as $name){
  6. if($_POST["name"]==$name){
  7. echo "I know you! Your name is ".$name;
  8. $knowYou=1;
  9. }
  10. }
  11. if(!$knowYou){
  12. echo "I dont know you, ".$name;
  13. }
  14. } else {
  15. echo "Please enter your name";
  16. }
  17. }
  18. ?>
Success #stdin #stdout #stderr 0.02s 52480KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined index: submit in /home/AAi5Xj/prog.php on line 3