i connect to the database fine, and this is the code to pull the links from the db and put them into tables with captions.
database looks like
link namez
[php]<?php
include(“connect.php”);
$counter=0;
$number_of_thumbs_in_row = 2;
$result=mysql_query(“select * from links”);
$nr = mysql_num_rows( $result );
while( $row = mysql_fetch_array( $result ) )
{
$result_array[] = “”;
}
foreach($result_array as $thumbnail_link)
{
if($counter == $number_of_thumbs_in_row)
{
$counter = 1;
$result_final .= “\n\n
}
else
$counter++;
$result_final .= "\t<td>".$thumbnail_link."</td>\n";
}
if($number_of_photos_in_row-$counter) {
$result_final .= "\t<td colspan='".($number_of_photos_in_row-$counter)."'> </td>\n";
$result_final .= "</tr>";
}
?>[/php]
can’t seem to get it to work…i’m pretty new so i’m assuming i’m making some horrible mistake i can’t see >.<
help pleasee thanks!