将选中的项目加载到另一页

时间:2016-11-21 11:08:20

标签: javascript php

我将数据库中的一些文章加载到一个页面中,我想只使用一个复选框加载已检查的文章到下一页,这样我就可以用它来创建一个简报。我尝试使用普通的JS脚本,但我不知道下一步该怎么做以及如何正确识别我标记的那些脚本。 `

<?php
   try{
   $bdd = new PDO('mysql:host=localhost;dbname=TestDb;charset=utf8', 'root', 'TestingDb123');
   }
   catch (Exception $e){
           die('Error : ' . $e->getMessage());
   }

   $result = $bdd->query('Select Title, Link, Image_Path, pubDate, Description from RSS ');
   ?>

<html>
   <head>
      <link href="style.css" rel="stylesheet" type="text/css">
      <title>Affichage</title>
   </head>
   <body>
      <div class="recherche">
   <input type = "text" name="recherche" class ="rech">
      </div></br></br>
   <div class="btnrech">
   <input type = "button" name="rechercher" value="Rechercher" class="rech">
   </div>
   <?php
      while ($donnees = $result->fetch())
   {
   ?>
      <div class="general">
         <div class="block">
            <div class="line">
               <input class="check" type="checkbox" name="test" value="" id="Selected">
               <h3 class="titre"><?php echo $donnees['Title'];?></h3>
               <p  class="pubDate"><?php echo $donnees['pubDate'];?></p>
            </div>
            <div class="line2">
               <div class="image-article"><img src="<?php echo $donnees['Image_Path'];?>" width="100%" height=""></div>
               <p class="Description"><?php echo $donnees['Description'];?></p>
            </div>
         </div>
      </div>
      </br>
      <?php
         }
         ?>
      <div class="Bouton">
         <input type="button" name="confirmer" value="Suivant >>" class="btn">
      </div>
   </body>
</html>

`

0 个答案:

没有答案