Shedevil
January 11th, 2006, 14:19
Hiya,
Currently I'm putting together an affiliates page for my fanfiction archive.
The script I'm using for this is in MySQL.
I've ran into a problem though. The affiliate script is listing the images in rows rather than colums.
E.g. it's doing this with my clickable images:
-
-
-
-
-
-
Rather than doing this:
- - -
- - -
Is there anyway I can make the CLICKABLE images read it correctly in table form? As there are no </br> in the script or <p> or even a table.
This is my complete script (edited for privacy):
connect.php
<? $mysql_host = "localhost";
$mysql_user = "cpaneluser_databaseuser";
$mysql_pass = "databaseuserpass";
$mysql_data = "cpaneluser_database";
$mysql_table = "affiliate";
mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die("Couldnt connect, try again. " . mysql_error());
mysql_select_db($mysql_data) or die("Cannot select database! Please Try again.
" . mysql_error());
?>
My affiliates.php
<? include('connect.php');
$query = "SELECT * FROM affiliate";
$result = mysql_query($query) or die('Error, query failed');
while ($row = mysql_fetch_array($result))
{
echo "<a href='".$row['link']."' target='"._blank."' title='".$row['name']."'><img src='".$row['img']."' border='0'</a>";
}
So umn, help? PLEASE?????? I've been at this for 12 hours and no results...I'm about to glitch out and throw my laptop against the wall!:nervous: Oh yeah and here it is in action: Crystal Rose Affiliates (http://www.crystalrose.be/affiliated.php)
Currently I'm putting together an affiliates page for my fanfiction archive.
The script I'm using for this is in MySQL.
I've ran into a problem though. The affiliate script is listing the images in rows rather than colums.
E.g. it's doing this with my clickable images:
-
-
-
-
-
-
Rather than doing this:
- - -
- - -
Is there anyway I can make the CLICKABLE images read it correctly in table form? As there are no </br> in the script or <p> or even a table.
This is my complete script (edited for privacy):
connect.php
<? $mysql_host = "localhost";
$mysql_user = "cpaneluser_databaseuser";
$mysql_pass = "databaseuserpass";
$mysql_data = "cpaneluser_database";
$mysql_table = "affiliate";
mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die("Couldnt connect, try again. " . mysql_error());
mysql_select_db($mysql_data) or die("Cannot select database! Please Try again.
" . mysql_error());
?>
My affiliates.php
<? include('connect.php');
$query = "SELECT * FROM affiliate";
$result = mysql_query($query) or die('Error, query failed');
while ($row = mysql_fetch_array($result))
{
echo "<a href='".$row['link']."' target='"._blank."' title='".$row['name']."'><img src='".$row['img']."' border='0'</a>";
}
So umn, help? PLEASE?????? I've been at this for 12 hours and no results...I'm about to glitch out and throw my laptop against the wall!:nervous: Oh yeah and here it is in action: Crystal Rose Affiliates (http://www.crystalrose.be/affiliated.php)