php - Collect DYNAMIC data on URL via $_GET without form -


i'm blocked on little problem, think i'm close answer, still didn't managed got it.

here issue :

i have few tags on page, each giving $id_customer , $id_project on page, , on page want collect data on url because need next query.

unfortunately i'm not using form give data, can't collect via names.

here code :

on page send (i guess ok there because have data on url)

               if($result){                 while($row = mysqli_fetch_assoc($result)){                  $id_client=$row['id_client'];                 $id_projet=$row['id_projet'];                 $nom=$row['nom'];                 $adresse_site=$row['adresse_site'];                 $nom_site=$row['nom_site'];                 $vignette_site=$row['vignette_site'];                 $desc_site=$row['desc_site'];                 $en_ligne=$row['en_ligne'];                 $_get['id_client']=$id_client;                 $_get['id_projet']=$id_projet;                 ?>                     <!-- <form method="post" action="projet-in.php" id="form_<?php echo $id_client."-".$id_projet ; ?>">                         <input type="hidden" name='client' value="<?php echo $id_client; ?>" />                         <input type="hidden" name='projet' value="<?php echo $id_projet; ?>" />                     </form> -->                         <input type="hidden" name='client' value="<?php echo $id_client; ?>" />                         <input type="hidden" name='projet' value="<?php echo $id_projet; ?>" />                             <div class="col-xs-12 col-sm-6 col-md-4 bloc-galerie bloc-galerie"><a id="submit" href="projet-in.php?<?php echo $_get['id_client'].'&'.$_get['id_projet'] ;?>" />                                 <span class="hover-galerie">                                     <p>site</p>                                     <p class="texte-rose"><span class="nom-site"><?php echo $nom_site; ?></span><br /><?php echo $adresse_site; ?></p>                                     <p><?php echo $desc_site; ?></p>                                 </span>                                 <img src="images/<?php echo $vignette_site; ?>" alt="<?php echo $nom; ?>" /></a>                             </div>                 <?php              }          }         else{                    echo "non";         }        ?> 

then on second page (here issue) :

       include('menu.php');            $id_client=$_get[0];           $id_projet=$_get[1];           $query="select * db_clients id_client=$id_client , id_projet=$id_projet";           $result=mysqli_query($connexion, $query);          if($result){             while($row = mysqli_fetch_assoc($result)){                   $adresse_site=$row['adresse_site'];                 $nom_site=$row['nom_site'];                 $lien_site=$row['lien_site'];                 $chapeau=$row['chapeau'];                 $devices=$row['devices'];                 $img_accueil=$row['img_accueil'];                 $img_collection=$row['img_collection'];                 $img_produits=$row['img_produits'];            ?> 

thank !

edit : tried $_session every tag showed last recurrence on session ofc

you have name params in url :

href="projet-in.php?idclient=<?php echo $_get['id_client'].'&idproject='.$_get['id_projet'] ;?>" 

and after, in project-in page, have use name :

$id_client=$_get['idclient']; $id_projet=$_get['idproject']; 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -