Associate
- Joined
- 11 Oct 2008
- Posts
- 268
I'm trying to edit someone elses code to reverse the mysql results but im not having much luck. If its simple would someone mind telling me how to do it please.
I will keep google'ing it to try and find the answer myself in the mean time.
heres the code
I will keep google'ing it to try and find the answer myself in the mean time.
heres the code
PHP:
<?php
if(! $conn )
{
die('Could not connect: ' . mysql_error());
}
$sql = 'SELECT id, name, url FROM newsletters';
mysql_select_db('oakfarm');
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}
while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
echo <<<DB
<img src="img/1.gif"> NAME: $row[name] <br>
<img src="img/1.gif"> <a href="$row[url]">DOWNLOAD / VIEW</a> <br>
<img src="img/1.gif"> <a href="?nav=manage_newsletters&delete=yes&id=$row[id]&name=$row[name]">DELETE</a> <br>
-----------------------------------------<br><br>
DB;
}
?>