dimanche 6 décembre 2020

Please help me ! I looped through associative array results and displayed them yet

/* yet I couldn't use the results When clicked to send their value to a content manager page which will construct different type of pages accordingle to the clicked result value. */

 <*?php
include 'connection.php';
$sql="select Org_Name from hum_organization";
$result=mysqli_query($conn,$sql);
$row=mysqli_num_rows($result);
if($row){
    while($row=mysqli_fetch_assoc($result)){
$names=$row['Org_Name'];
?>*

/* i used separate iteration of forms to display the result,so i could retrieve the data from the data base,put each result on different forms and when i submit one of the form the submitted/clicked form get to send value to content manager.*/

    <form action="user/index.php" method="POST">
<div class="button-info">
  <button class="button-info" type="submit"  name="OrgName" value="<?php echo $names; ?>">       <?php echo $names;?></button> 
   </div>   
   </form>
 
   <?php }        
    }                     
    else{ ?>
    <p>No Result found...</p>
    <?php } ?>    



Aucun commentaire:

Enregistrer un commentaire