Tony Santos
Tony Santos

Reputation: 45

Show table only after doing a search

I'm working on this little project and I wanted the table with the results only to show up after I hit the button / make a search...

Here is the link http://img.needforgaming.x10.mx/procurar.php My goal is to hide the table before making a search.

Upvotes: 0

Views: 105

Answers (1)

Amal Murali
Amal Murali

Reputation: 76646

Use isset() to check if the form was submitted.

if(isset($_POST['btn_procurar'])){

//display form

}

An alternative would be to use empty():

if (!empty($_POST)) {

//display form    

}

Hope this helps!

Upvotes: 1

Related Questions