mysql - Passing variable to another php via a href -


im building website need see information of each client separately when clicking button.

i created table of clients when want pass id of client(all of database) when click link, wont work. , im having problems "undefined offset" error.

i tried putting session outside of while() statement passes last client's id. hope can me, here's code

<tr>                     <td >                         <?php echo $row->clave; //= $clave;                              $clave = $row->clave;                             $_session['variable'] = $_get[$clave]; //this id.                         ?>                     </td>                     //more rows                     <td >                         <a href="ahorro/ahorro.php">ir ahorro</a> //this want id go to.                     </td> 

the home page reads id of each row correctly, doesnt send it, said.

you use php's $get pass variables in url.

<a href="ahorro/ahorro.php/?clave=<?php echo $clave; ?>"> 

would develop url looks "ahorro/ahorro.php/?clave=hello world" , in other file can access variable this:

echo $_get["clave"]; 

would echo out:

"hello world" 

here link more information:

http://php.net/manual/en/reserved.variables.get.php


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -