satanakiX Posted January 15, 2012 Share Posted January 15, 2012 hello i have problems refreshing this: <?php header("Refresh: 2;"); $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = '02071987'; $dbname = 'ProvoleasDB'; mysql_connect($dbhost,$dbuser,$dbpass) or die ("I could not connect!"); mysql_select_db($dbname) or die (mysql_error()); header("Content-type: text/xml"); echo '<?xml version=\'1.0\' encoding=\'UTF-8\'?>'; echo ' <rss version=\'2.0\'> '; echo ' <channel> <title></title> <description></description> <link></link>'; $data = mysql_query('SELECT * FROM UploadItem ORDER BY IID DESC LIMIT 10'); while($row = mysql_fetch_array($data)) { echo ' <item> <title>'.$row['FileName'].'</title> <link>localhost/items.php?iid='.$row['IID'].'</link> <description>'.$row['IID'].'</description> <guid>http://localhost/items.php?iid='.$row['IID'].'</guid> </item>'; } echo ' </channel> </rss>'; ?> <html> <head> </head> <body> </body> </html> could you help me?? :confused: Quote Link to comment https://forums.phpfreaks.com/topic/255065-problem-with-xml-file-into-php-file/ Share on other sites More sharing options...
premiso Posted January 15, 2012 Share Posted January 15, 2012 What are the sed problems? Quote Link to comment https://forums.phpfreaks.com/topic/255065-problem-with-xml-file-into-php-file/#findComment-1307883 Share on other sites More sharing options...
satanakiX Posted January 15, 2012 Author Share Posted January 15, 2012 Nothing is happeng. or if I leave the first line empty the header (refresh) is working but I dont see the last 10 items. I see the xml code why is that happenig? i just want this code to be refresh every 60 : Quote Link to comment https://forums.phpfreaks.com/topic/255065-problem-with-xml-file-into-php-file/#findComment-1307902 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.