After using some error reporting, I have found that the error is now this:
PHP Code:
Notice: Undefined index: title in index.php on line 36
Here's the code: (note this code is a piece of the main code, but this by itself needs to become functional (the title issue to be fixed) before I combine this with the other php code, doing it this way so it's easy for me to problem solve, but it's not been easy)  )
What's the trick to figuring out php? I want to love it not hate it, but it's a love / hate relationship I guess
<!-- (Mult-Column Output Code) -->
PHP Code:
<?php // Report all PHP errors error_reporting(-1); ?>
PHP Code:
<?php // db connection include('connect.php');
// query $query="SELECT banner FROM amp_ads"; $result=mysql_query($query); $cols=5; // Here we define the number of columns
echo "<table align=\"center\">"; // The container table with $cols columns do { echo "<tr>"; for($i=1;$i<=$cols;$i++) { // All the rows will have $cols columns even if the records are less than $cols $row=mysql_fetch_array ($result); if($row){ $img = $row['banner']; ?>
HTML Code:
<td>
<table align="center">
<tr valign="top">
<td>
<!-- columns can have both text and images -->
PHP Code:
<?php echo "<img src=\"$row[banner]\" border=\"1\" title=\"$row[title]\">"; ?>
HTML Code:
</td>
<td>
<b>
PHP Code:
<?php // echo $row['name'] ?></b><br /> <?php // echo $row['email'] ?><br /> <?php // echo $row['password'] ?><br />
HTML Code:
</td>
<td width="50"> </td> <!-- Create gap between columns -->
</tr>
</table>
</td>
PHP Code:
<? } else{ echo "<td> </td>"; //If there are no more records at the end, add a blank column } } } while($row); echo "</table>"; ?>
__________________
Made2Own
Last edited by Brian07002; 10-07-2011 at 09:29 PM..
|