1

I have a form who uses the post method:

<form method="POST" action="">

And I have an input at the end of it to submit the information typed:

<input type="submit" name="okform" value="Submit"/>

Here is PHP code I tried to execute:

<?php

$bdd = new PDO('mysql:host=127.0.0.1;dbname=pure', 'root', '');

if(isset($_POST['okform'])){
    echo "yo";
} 

?>

the "yo" string shows when I click on the submit button, but when I refresh my website page the string is still shown. The $_POST['okform'] variable is set even after refreshing the webpage. Why? I don't understand.

Any thoughts?

topher
  • 14,790
  • 7
  • 54
  • 70
Baptiste Arnaud
  • 2,522
  • 3
  • 25
  • 55

0 Answers0