Call an HTML page passing information to MySQL database via PHP

0

Hello
I took a project here at the company, where it was proposed to pre-question the user before he could access a questionnaire. To some extent the user browses between possibilities and at one point he has to answer some things, which is where I am caught. I'm doing the site in HTML and did not need to use PHP so far. At this point I will have to use it. We have the database installed and configured, just need to know how to use it now! The question is: How can I call the next page by passing the value to the database that the user selected and loading the page that refers to the user's choice? Exemplifying:

- Yes - > - > Load the page that corresponds to the affirmative answer.

After that, on a next screen, I'll have to collect what the user types too, so I need to know how to pass what he typed after clicking "Proceed". So friends! How can I do this? I do not mess with PHP have a long time and I accepted this task as a challenge. I was able to implement very cool things and this, which is the most important part, I'm stuck ... Maybe exhausted to have to remember so much until here!

So this is the question! What is the best method to validate what the user has chosen / typed, send to the bank and then load the user choice page? Ah! The detail is that information will be inserted gradually ... Type, the user answers the first question (of type Boolean), it is stored, then the bank will "wait" for the next input, still in the same ID. Then when the user types and clicks 'forward' the typed text (of type VarChar) will be sent and wait for the next input. Upon completion, the user will be redirected to the Questionnaire, which is ready. In this questionnaire he will make a few more inputs, adding to the ID of the Pre-questionnaire. If this is very difficult to do, I can concatenate this data when I do the report - which is what you need - at the end of the questionnaire. What I developed in HTML was basically ... Nothing. I'm really not knowing what I'm going to use! The part where the user chooses between Yes and No is the following:

    <div id="content">      
    <p><br>Você procurou seu Gestor Imediato para resolver a situação que deseja relatar na Ouvidoria Interna?</p> 
    <nav>
    <ul class="group" id="menu">
        <form action="" method="get" id="validar">
        <li>
        <input type="hidden" name="submit_sim" />
        <a href="#" onClick="document.getElementById('validar').submit();">Sim</a></li>
        <li>
        <input type="hidden" name="submit_nao" />
        <a href="#" onClick="document.getElementById('validar').submit();">Não</a></li>
    </ul>
    </nav>
</div>

I'll validate the connection on connect.php and then insert the data into the table via && _GET. It's the best method, right !? :)

So this is it! This is my first question here, so excuse me if I inflicted any rule and correct me if I lacked any information. Remembering that I do not want anything chewed, I just want a direction of what I should use and how, if possible! Thank you all!

    
asked by anonymous 14.12.2016 / 23:54

0 answers