View Single Post
Old 05-14-2012, 10:03 AM  
roly
Confirmed User
 
Join Date: Aug 2002
Posts: 1,844
hi

i've got the fwrite to work and my script works ok, so i've got both bits working seperately, but i'm not sure how i call all of this:

Code:
$sql = "select foo from bar where catid = $cat limit 20";
      $result = mysql_query($sql ,$db);

 while ($myrow = mysql_fetch_array($result))
{
echo $myrow['something'];
}
into this $scriptoutput:

Code:
$myfile= fopen ("/home/domains/domain.com/public_html/mytxt.txt", "w+");
fwrite($myfile, $scriptoutput);
fclose($myfile;
how do i get that first little script to output into $scriptoutput, that's what i'm stuck on, anyone got any advice?

thanks in advance

Last edited by roly; 05-14-2012 at 10:12 AM..
roly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote