php connection problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yeshello54
    New Member
    • Mar 2009
    • 54

    php connection problem

    Here is my problem. I have a small php page that has a search function that returns the table that you search. It works fine . but my problem is that i dont want the data to show up until the user hits search. as of now when you go to the webpage all of the data tables are displayed and dont change untill you submit a new search. Any Ideas on how to fix this..

    Thanks.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    check if the search form has been submitted (e.g. empty $_POST array), otherwise don’t display the data.

    Comment

    • yeshello54
      New Member
      • Mar 2009
      • 54

      #3
      Yes of course how simple. Thank you.

      solved with one line of code

      Code:
      if ($_POST)
      {
      do something
      }

      Comment

      Working...