sql >> Database >  >> RDS >> Mysql

php- en html-formulier op dezelfde pagina

    <?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>


  1. Database-ontwerp:objecten met verschillende attributen

  2. Bereken percentiel in MySQL op basis van totalen

  3. Geldt ORDER BY voor of na DISTINCT?

  4. 3 manieren om de Modulo terug te sturen in MariaDB