<?php
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("database", $con);
$result = mysql_query("SELECT * FROM videos2");
while($row = mysql_fetch_array($result))
{
echo $row['ID'] . "- " . $row['URL'];
echo "<br />";
}
mysql_close($con);
?>
And until here, all is right, the code does what i want it to do, no problems. But i am using this for an app that can only bee feeded .txt files, so it causes a problem. i need a code that gets the displayed data and creates a new text file (links.txt) with the data exactly displayed as in links.php. the data displayed in links.php is like:
- google.com - example.com
what code can i use? Thanks!
This post has been edited by Atli: 17 February 2012 - 05:26 AM
Reason for edit:: Don't post links to sites with malicous content!

New Topic/Question
Reply



MultiQuote





|