hey guys. i have created this page that has a text box and a search button and below them is another button let's call this button button A. when the search button is clicked the query runs and a table regarding whatever was searched will be displayed and thats okay. My question is how do i make button A when clicked, the current table being displayed will disappear and the table regarding button A will appear instead. does that make sense? im sorry im not really good at explaining myself.

Why not trying:

PHP code:

<?php
if(isset($_POST['BTN_NAME']){
        //do fucnction or query here.  
    }
    if(isset($_POST['buttonA']){
        //do stuff here
    }
?>

HTML

<form action="" method="post" name="TestForm">
    <input type="text" name="text1">
    <input type="submit" value="Run Search" name="BTN_NAME">
</form>

<form action="" method="post" name="TestButtonA">
    <input type="submit" value="Button A" name="buttonA"
</form>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.