Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

formulário php e html na mesma página

    <?php 
       @session_start();
       $_session['count']= $_GET['count'];
       $_session['sum']= $_GET['Sum'];
       for ($i=0;$i<$_session['count'];$i++){

          //make necessary changes here as well
         echo unserialize($_GET['serialized_name'])[$i];

         //use session to store your data from previous page
       ?>
     <?php
         //put this code above the form to process the submitted data which was previously sent to update.php

      if(isset($_POST[submit])){
                //Your code
        e.g.
              $name=$_POST['name']
           //whenever you want to access previous data just get it from session variable.
         e.g. $count=$_SESSION['count'];

      }?>

     <html>
            <!--Submit the data of the form to itself instead of update.php -->
       <form method="post" action="<?php echo $PHP_SELF;?>">
           <!--your html code -->
       </form>
     </html>