Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to display result of php file in an html file

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 123
    Answer it

    I need help please. I create html file with 2 tabs. The first tab contains form that takes user input and submit it to php file. I want the result of the php file to be displayed in the second tab.

    HTML file:
     

    <ul class="nav">
        <li id="TAB0" class="selected"><a href="#TAB0"><em>Run function</em></a></li>
        <li id="TAB1"><a href="#TAB1"><em>Results</em></a></li>
        <li id="TAB2"><a href="TAB2"><em>Help</em></a></li>
    </ul>
    <div class="content" id="CONTENT">
        <!--TAB0-->
               <div id = "TAB0" class="active">
                <div class="MainContent">
                  &lt;form id='myform' enctype='multipart/form-data' name='myForm'  method='post' action="calculateResults.php">
                          SOME INPUTS HERE
                       <p>&lt;input type='button' name="mybut" value='Run'></p>
                  <form></div></div>
         <!--TAB1-->
               DISPLAY THE RESULT HERE
         <!--TAB2-->

    What is done actually with the above code is display the result in a new window. The php file is already print the output result in some texts and table. I want when I click the button in the first tab to execute .php file and display the result in the second tab not in a new window.

    Any help please? Thanks,

 1 Answer(s)

  • Hello,

    I just read out your query then i realized that you are trying to display data in different tabs. I am going to share a link which will describe the tab creation process. http://codepen.io/CesarGabriel/pen/tKaxq Thank you Deepak Verma

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: