Jump to content

session vars from db query


pacome

Recommended Posts

I select from DB and en up with an array... the question is: is it possible to register the variables as session varibles with different names?

 

$sqlVuelos = "SELECT * FROM vuelos ORDER BY RAND() LIMIT 4";

$displayVuelos = mysql_query ($sqlVuelos) or die ('query wrong');

mysql_query ($sqlVuelos) or die (mysql_error ($conVuelos));

 

while ($rowVuelos = mysql_fetch_array($displayVuelos)) {

$vuelo = $rowVuelos["vuelo"];

$tipo = $rowVuelos["tipo"];}

 

thank you...

Link to comment
https://forums.phpfreaks.com/topic/49437-session-vars-from-db-query/
Share on other sites

I select from DB and en up with an array... the question is: is it possible to register the variables as session varibles with different names?

 

$sqlVuelos = "SELECT * FROM vuelos ORDER BY RAND() LIMIT 4";

$displayVuelos = mysql_query ($sqlVuelos) or die ('query wrong');

mysql_query ($sqlVuelos) or die (mysql_error ($conVuelos));

 

while ($rowVuelos = mysql_fetch_array($displayVuelos)) {

$vuelo = $rowVuelos["vuelo"];

$tipo = $rowVuelos["tipo"];}

 

thank you...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.