Hi How do I post the data created with this code:
fopen question
5
Hi
How do I post the data created with this code:
<?php
require('config.php');
require_once('include/functions.php');
$result = mysql_query("SELECT ProductID, ProductName FROM ura_items WHERE CategoryID != 0 AND CategoryID != 1 AND CategoryID != 2 ORDER BY Add_Date DESC")
or die(mysql_error());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
echo "".seo_links('detail', $row['ProductID'], $row['ProductName'], 1, _SEO)."<br>";
}
?>
into another text file?
I can get a single line to print to another file using the code below but I can't get the code above to run and print out a long list.
How do I post the data created with this code:
<?php
require('config.php');
require_once('include/functions.php');
$result = mysql_query("SELECT ProductID, ProductName FROM ura_items WHERE CategoryID != 0 AND CategoryID != 1 AND CategoryID != 2 ORDER BY Add_Date DESC")
or die(mysql_error());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
echo "".seo_links('detail', $row['ProductID'], $row['ProductName'], 1, _SEO)."<br>";
}
?>
into another text file?
I can get a single line to print to another file using the code below but I can't get the code above to run and print out a long list.
Code:
<?php
$file= fopen("sitemap.txt", "w");
$data = "testing";
fwrite($file, $data);
fclose($file);
print "data posted";
?> - ussher
- SteveJohnson
- [1] reply
- Mkj
- [1] reply
Next Topics on Trending Feed
-
5