mysql - How to use fetch array in another php file -


i have $rowname = mysql_fetch_array($resultname); in login.php file. there way can use array in main.php file?

thx!

use sessions http protocol stateless one.

login.php

 <?php  session_start();   //..... db connection , query code...   $rowname = mysql_fetch_array($resultname);  $_session['rowarr'] = $rowname; 

main.php

<?php session_start(); if(isset($_session['rowarr'])) {  print_r($_session['rowarr']); } 

Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -