By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,678 Members | 1,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,678 IT Pros & Developers. It's quick & easy.

Php and Mysql results display

P: 4
My be I did not ask the correct question

this scripts run ok and returns results fron db as a row in the from of text http://www.xxxxxxxxxxxxxxxxxxxx

But the the results http is differerent for each search. QUESTION how can I get the resulst in to the code ?? ie

$myfile = file("http://..............................");

so the result is entered typed between the (" ");

thanks again anyone ken

full code below...............................
Expand|Select|Wrap|Line Numbers
  1. <?
  2. include 'config_inc.php';
  3. include 'error_inc.php';
  4. include 'results_inc.php';
  5.  
  6. $var = $_GET['q'] ;
  7.  
  8. $query  = "SELECT shape_url FROM shape WHERE shape_id = '".$var."'";
  9.  
  10. $result = mysql_query($query);
  11.     if(mysql_num_rows($result) ==0){
  12.     echo $err[3] ,$var; 
  13.  
  14.  
  15. }    
  16. while($row = mysql_fetch_row($result))
  17.  
  18. {
  19.     $shape_url = $row[0];
  20.  
  21.     echo  "shape_url : $shape_url<br>" ;
  22.     echo $row['0'];
  23.  
  24.  
  25.  }    
  26.  
  27.  
  28. $myfile =  file("http://www.adverts.hecgroup.net/search_mc/shape_25.htm");
  29. foreach ( $myfile as $vals){
  30. print "$vals";
  31. }
  32. ?>
Jul 12 '08 #1
Share this Question
Share on Google+
2 Replies


dlite922
Expert 100+
P: 1,584
so instead of saying file("hard coded text"), do file($shape_url)

is that the question? I"m not really sure what you were asking.


-Dan
Jul 15 '08 #2

nobin
P: 3
Did you want hole file contants
Jul 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.