gokhul Posted April 14, 2009 Share Posted April 14, 2009 Hello, Can anyone tell me how can i save a variable in the results page and call it into another php page for a query. I got the result (KEGG_ID and Gene_Name) page from the following query import_request_variables('p','p_'); $connect=mysql_connect('localhost','gkkilaru','gkkilaru') or die('could not open:'. mysql_error()); mysql_select_db('gkkilaru_db'); /* Identify database */ $result=mysql_query("SELECT * FROM HPD WHERE $p_searchtype='$p_search'"); I need to have additional data related to the variable Gene_Name in the result page in another page. I tried this import_request_variables('p','p_'); $connect=mysql_connect('localhost','gkkilaru','gkkilaru') or die('could not open:'. mysql_error()); mysql_select_db('gkkilaru_db'); /* Identify database */ $result=mysql_query("select * from HPD1 where HPD1.Gene_Name = (SELECT Gene_Name FROM HPD WHERE KEGG_ID='$p_search')"); But,I am getting a error like undefined variable p_search at line 13. Can anyone tell me how to store the Gene_Name in the result page and query for additional data using it? Link to comment https://forums.phpfreaks.com/topic/154085-storing-the-result-and-calling-it/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.