PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
AlbinoJellyfish
Forum Commoner
Posts: 76 Joined: Sun Apr 04, 2004 7:39 pm
Post
by AlbinoJellyfish » Mon May 31, 2004 12:58 pm
I am trying to create a news script that will have a image, with text over it for the title. The image does not work.
Code: Select all
<?PHP
$db = mysql_connect("blah");
mysql_select_db("seven" , $db) or die("Couldn't open $db: ".mysql_error());
$query = "SELECT * FROM sevennews";
$result=mysql_query($query);
while ($row = mysql_fetch_array($result)){
?><td width="330" height="13" background="bar_dark.gif" valign="top">
<p style="margin-left: 45; margin-top: 0; margin-bottom: 0"><b><font color="#000000">
<?
echo $row['date'];
echo ' - ';
echo $row['description'];
echo '</font></b></p>
</td>
</tr>
<tr>
<td width="330" height="52" valign="top">
<p style="text-indent: 20">';
echo $row['story'];
echo ' </tr>
<tr>
<td width="330" height="8" valign="middle" align="right">
<p style="text-indent: 0; margin-left: 0; margin-right: 25; margin-top: 0; margin-bottom: 0"><b>';
echo $row['author'];
echo ' </b></td>
</tr>';
}
?> How come the image doesnt display in the background of a cell?
Last edited by
AlbinoJellyfish on Mon May 31, 2004 1:12 pm, edited 1 time in total.
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Mon May 31, 2004 1:04 pm
Paddy
Forum Contributor
Posts: 244 Joined: Wed Jun 11, 2003 8:16 pm
Location: Hobart, Tas, Aussie
Contact:
Post
by Paddy » Mon May 31, 2004 1:28 pm
It is very early morning here but shouldn't
background="bar_dark.gif"
be
background="images/bar_dark.gif"
?
AlbinoJellyfish
Forum Commoner
Posts: 76 Joined: Sun Apr 04, 2004 7:39 pm
Post
by AlbinoJellyfish » Mon May 31, 2004 3:43 pm
na, i forgot to make a table row to put the stuff into... if you look at the code you will see no <tr> after i make the table...