/    Sign up×
Community /Pin to ProfileBookmark

HTML In PHP — Issue.

Hey guys. First of all, thank you very much for your help in my previous thread. I finally got the bloody thing to work.

Now, I am having an issue trying to get a decent display of my data going on.

My current code:

[code=php]$link = mysql_connect(‘localhost’, ‘****’, ‘*****’) or die(‘Could not connect: ‘ . mysql_error());

mysql_select_db(‘*****’) or die(‘Could not select database’);

$query = ‘SELECT item_buyer, item_name FROM eqdkp_items ORDER BY item_id DESC LIMIT 0,8’;

$result = mysql_query($query) or die(‘Query failed: ‘ . mysql_error());

echo “<table width=350 align=right>”;
echo “<tr><th colspan=2 align=center><b><u>Latest Loots</u></b></th></tr>”;

while (list($buyer, $item_name) = mysql_fetch_row($result)) {

$item_link = “[item]”.$item_name.”[/item]”;

$myMessage = itemstats_parse($item_link);

echo (“<tr><td>”.$buyer.”</td><td>”.$myMessage.”</td></tr>”);

}

echo “</table>”;

mysql_free_result($result);

mysql_close($link);[/code]

What I want to do is either put a background image behind this table, or make two borders around the table — one left border and one bottom border.

I have been trying different forms of HTML inside of the PHP to make this happen, but apparently it is just not clicking. I have thought about using an external style sheet, but I thought that that would have been more of a hassle.

Any help would be appreciated.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@TheLanyardApr 10.2008 — I would definitely go with the css option. A good practice is to rely on HTML only for mark-up and CSS for layout/style. Can you post the page source from when this is executed from a browser?
×

Success!

Help @Critical spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...